How to make a pawn move physics objects
Hey! I'm new to Unreal Engine, an I'm currently working on a top-down shooter project. I'm using a Pawn with the Floating Pawn Movement component, and the movement is handled by add movement input. Although, the pawn can collide with other physics objects but it can't move them. If I attach any collision component as the root, it interacts with the physics objects. Is there any way that I could make the pawn move the objects?
Any help is appreciated!
asked Jul 06 '16 at 11:57 AM in Blueprint Scripting
TL; DR: For a Pawn to have proper physics interactions/collisions, all that is required is proper handling of the hit events via physics forces.
Hey Prithvi, First of all, thanks a lot for giving your valuable time. I really appreciate it!
I went through the links you provided and it did help me understand a bit more about collisions.
Although we couldn't reach to a solution to the main problem, it did make me understand what was going on.
As Krxtopher pointed out that the physics interaction was proper in other templates involving character components, and the method you provided via blueprints, I came to a conclusion that all I need for the proper interaction was to create either: 1: A custom movement component via code or, 2. Implementing the OnComponentHit behavior in the Pawn's blueprint
I guess, I'll give both of these a shot. Also, I looked into this answer https://answers.unrealengine.com/questions/303853/making-custom-pawn-physics.html and then, into the Character Component's cpp file, and I believe that all the Character Components use ApplyForce and ApplyImpulse for the physics simulation, and to handle hit events.
So, as far as my knowledge goes, that's probably the only way to make a non-physics pawn interact with other physics bodies.
answered Jul 07 '16 at 04:13 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here