Object placement when aiming?

I’m trying to create a special weapon, based on the FPS demo, that does something like the TF2 engineer:

I select the weapon and then i’m able to choose which item to place. This part is not so important, since it’s not difficult. The difficult part is: how can i pre-render an object with a specific shader (semi-transparent, etc.) and then actually place it, running all it’s logic? Also, how do i restrict where it can and cannot be placed (how do i detect if the model is overlapping another?)? What’s the best way to do it?

about overlap, you need to use a shaped trace(box/sphere) trace, and filter that with possible conflict BP classes.

about pre-render an object, you obviously need a shader created and keep a reference for your pawn.(also make it dynamic so that you can render as say blue or red tint).
what I did before is to move a shape component around world space with trace hit location, you can’t really have complex collision for this one, so it’s better to make it like TF2 where you have a specific base area that you need, so you can just use the box trace.
it would be like, when switch to placing mode, make shape component visible and move to where current trace hit ends, after you commit placement, hide the component and spawn actual actor.
When switching between different shapes, just use a array and enum to select your desire shape.

Thanks a lot for the help! Any ideas of how to detect if the item placement is possible? (just check collisions on the shape component?) Also, what would i have to predict in order to implement this in multiplayer? I’m starting with the Arena FPS template.

when you do a say box trace, check the output, you can drag the pin and break the result, it will then have a “blocking hit” bool to tell you if it’s blocked or not.
you can then have another trace only hit level object/brush(say, world static) and then draw the red tint object.


Nice! Is that tutorial live?

Not yet. But zoombapup is on here sometimes, so you may be able to contact him for more details

I believe he has the sentry gun up.


My Bad

Part one -