How to make a pawn move physics objects

it is possible …wait let me try

do this

ok…i will

I tried it, and it seems like it will only add an impulse in the direction the Pawn is facing.
And it’s actually kinda glitchy as we move the pawn around.
Any luck with the AddForce method?

Okay, so, I replaced the ForwardVector by the Velocity, and it fixes things a bit.
It can be used, but it’s still a workaround. I still would like to use a more physics based approach though.

i was unable to make out how exactly you are using the add force , mind sharing a pic of BP? and make sure enable gravity is off(make it fly) . i am getting satisfying results like that.

what results are you getting pls share a photo of it.
(ctrl+prtscn)

AddForce works fine for me as well. And that’s the behavior I want to use!
And that’s what the problem is with AddMovementInput. The collisions don’t behave properl with it, while they do with AddForce.

The reason why I don’t want to use AddForce is the lack of control there is. Also, when I use the mouse rotation, it doesn’t work properly due to the torque being applied to the Pawn by external forces/impacts.

Also, if I’m not wrong, the physics simulation depend on the frame rate, right?
If that’s the case then I don’t think I’ll be using AddForce for controlling the pawn.

werockpokey, you’re right to insist on a solution that doesn’t rely on AddForce. You shouldn’t have to use AddForce to get what you want as is in evidence by the characters in the First Person and Third Person templates which behave exactly as you describe. There’s definitely something we’re overlooking. Would you mind sharing screenshots of your PlayerController and Pawn event graphs so we can more easily recreate your scenario?

even rolling template proves there is no need for add force(even impulse)

I’ll just share the screenshots of them…

I guess in the First and Third person blueprints, they have a collision component, and they use a Character class for the pawns.
Also, if I add a collision as the root in my pawn, the collisions work properly, but the physics doesn’t. I mean, I can easily move a 10000 Kg block with my pawn!! Which is not even close to possible had it been a proper physics collision. It would require the pawn to collide at a very very high speed with the block.
So, setting a collision as the root is also out of the window…

With addForce, everything works fine. But as I said, I don’t want to use this approach.

I just checked out the Rolling template, and in that template, they are adding torque to the ball to control the motion.
It is also a physics based approach to movement, and in this case, it is justified as well.

@Krxtopher, as you said, I also checked the First and Third person templates, and they do exactly what I want. But in my project, even when I choose the Pawn to inherit from Character class, it doesn’t behave the same way as the characters do in the first and third person templates.

I’m totally outta options, and I can’t understand what to do… :frowning:

Sorry for posting so much, but I’m just a bit too curious about this thing (^_^)"

Observation: In character pawns, there is a property under the Character Movement component that is: Character Movement: Physics Interaction, and it has a lot of stuff pertaining to the behavior which is seen in the First Person and Third Person templates.
Also, if any part of the character’s mesh is outside the Capsule Collision, the physics of the collisions go haywire.
Thus, any part which needs to have proper physics based collisions have to be inside the Capsule.

From what I have seen until now, that’s the only way by which I can justify how those Characters have proper collisions. But then, again, those are Characters, and not basic Pawns.

I hope this can help you guys to help me out!

i am not the one into collision and physics so all i can do regarding your curiosity is give you some links:

for setting colision of simple meshes


this one have some linnks regarding colision

a discussion or a request or rather a reason on custom collision in characters

this one based on ue4 physics

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.

1 Like

I’ll mark this as solved for now. Thanks a lot guys for pointing me in the right direction