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"

Keep momentum between pawns

I have a Vehicle and a regular 3rd Person character that can be swapped at any time when pressing a key.

In order for this to happen, though, I am not changing models, but rather destroying the current pawn and spawning a new one at the same location, which means the new pawn is completely motionless, even if the previous one was moving at a high speed. I would like to know how I could keep this momentum.

Setting velocity in both pawns and changing de gear and throttle in the vehicle didn't do anything.

I thought about messing around with physics, but didn't quite know how to go about it. How should I go about it? Should I not change pawns at all and, instead, just try and switch the current mesh?

Product Version: UE 4.14
more ▼

asked Jan 14 '17 at 01:42 PM in Blueprint Scripting

avatar image

185 5 8 14

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

1 answer: sort voted first

Not sure why you need to make 2 posts for this: https://answers.unrealengine.com/questions/548733/keep-momentum-when-switching-pawns.html

Why not not destroy the actors and just use the PlayerController to change the Possesion of the pawns?

more ▼

answered Jan 16 '17 at 12:05 AM

avatar image

689 20 5 50

avatar image blkhouse_vlucki Jan 16 '17 at 08:01 AM

That`s what I am currently doing, actually. I grab the current player`s controller, spawn the new pawn and possess it, destroying the other one. Should this already transfer the physics state (or at least the current velocity and acceleration) of one pawn to the other?

And regarding the double post... this one was not showing in my account, so I thought something went wrong when posting the question. Sorry about that.

(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