I have a trip mine that I want the player to be able to place on walls and on the ground. I don’t want the player attaching the mines to objects that move around. The way I’m doing this now is to cast a ray from the player’s eyes along the forward view vector. Where the ray hits is where the mine gets placed. This doesn’t work if the object later moves and leaves the mine floating in mid air. So the question is how do I detect whether the object the raycast hit is movable or static?
The interface changed a bit since I last did this, but you can LineTraceSingleByObjectType and specify FCollisionObjectQueryParams( AllStaticObjects ). Alternatively, if your collision channels are set up properly (i.e.: no static objects accidentally set as movable), LineTraceSingleByChannel against ECC_WorldStatic.