0
\$\begingroup\$

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?

\$\endgroup\$
2
  • \$\begingroup\$ "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? \$\endgroup\$
    – DMGregory
    Jun 6, 2020 at 12:56
  • \$\begingroup\$ 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. \$\endgroup\$
    – Stud
    Jun 6, 2020 at 13:08

1 Answer 1

0
\$\begingroup\$

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.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .