Player pawn to simulate physics

How can I get my player pawn to simulate physics, so while he is moving, if he bumps into a wall he will bounce off?


Let me elaborate a little more.
I’m making this in the vive. I’m using the hand controllers to move levers to move the player. The idea is your in a ship controlling it with levers in front of you. I’m building all this in the player pawn because you will not be able to exit the ship; it is the player pawn. I’m moving the player by using AddOffset based on the relative position of the levers. When the player hits an object you just go through it. I need to hit an object and bounce off it.

Here is a video of the basic controls;


I don’t have my UE4 open at the moment. But If I recall correctly, the Vive Pawn form the template (Which you seem to be using) has a motion_compontent to it? You could try to set it’s motion to flying, and instead of using mouse and keyboard controllers to move the pawn, you map your levers. The motion component would allow you to set various settings like accelerations, max speed, etc.

The reason you go through with your current set up is because you are adding an offset to the location of the pawn, so regardless of where the pawn is, the function will just set it’s new location. I suggest you look into the motion component, as that has collisions enabled and will stop you from penetrating objects. If you do want to keep your current set up, then you will have to add walls, that when the player collides, it will not add a new offset, or simply push the player back. But that is just reinventing the motion_movement component, so I highly suggest you look into using motion_component.

The demo looks cool. I’d like to try it out! PM and we can trade projects.

Thanks for the reply.

I was planning on doing something to that effect. I was thinking of adding a boolean before the addoffset that if the ship has hit a wall in the past .25 seconds it couldn’t add movement. But I couldn’t get it to move when hit with another object yet, and I wasn’t sure that was the best route to begin with.

I’ll try your suggestion in a few hours when I get home from work.

I wouldn’t mind sharing it at all if you’d like to try. PM me or I’ll PM you in a few hours.

Thanks again.

The Vive Pawn form the template has a motion controller in it, but I couldn’t find a fly setting or get it to move when hit, even when not applying addoffset. Does anyone have any ideas?


Not a motion controller. A motion component. A Character Movement Component, sorry.

The Pawn form the VR tempalte deosnt have one by default, but you can add a FloatingPawnMovement, or similar and experiment with that.

Also, I have no idea how to PM around here. Send me an email to eugenio.motanum91 AT and we can share Steam accounts or Skype info to chat.