# Creating a Pawn that simulates physics

I'm trying to make a Pawn that I can raycast against. Starting from the DefaultPawn object, I can't find a way to have a StaticMesh cube that simulates physics. My raycasting code works with Actors, but I'd like to apply the same feature to moving objects now.

Any advice on how to achieve this?

• "static" in the context of physics usually means "does not move or rotate" - so what kind of simulation is it that you need from a static cube? Jun 6, 2020 at 12:56
• I see why this is confusing, I wrote static cube because I am using static meshes. For now I am willing to swap the positions and velocities of my character and a selected pawn. I tested on actors for the positions, but I guess I need pawns for the velocity part.
– Stud
Jun 6, 2020 at 13:08

Using a DefaultPawn object allows to have a Pawn with physics. In order to Raytrace against Pawns, it is necessary to specify ECollisionChannel::ECC_Pawn when calling LineTraceSingleByObjectType.