x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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?

Thanks.

Product Version: Not Selected
Tags:
more ▼

asked Feb 21 '17 at 06:51 AM in Using UE4

avatar image

Joe1029
83 11 14 19

avatar image Joe1029 Feb 21 '17 at 05:55 PM

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; https://www.youtube.com/watch?v=zt7D2R1hW6M

Thanks.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Feb 21 '17 at 10:30 PM

avatar image

Motanum
625 58 65 306

avatar image Joe1029 Feb 21 '17 at 10:53 PM

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.

avatar image Joe1029 Feb 22 '17 at 04:46 PM

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?

Thanks.

avatar image Motanum Feb 22 '17 at 04:58 PM

Not a motion controller. A motion component. A Character Movement Component, sorry. https://docs.unrealengine.com/latest/INT/Engine/Components/Movement/

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

alt text

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question