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"

Pawn Velocity Momentum and Forward Thrusting

Hi folks,

I have tried every possible way I am capable of and just can't find a solution to my problem. Maybe someone in here can point me into the right direction.

Setting

  • Blueprints only

  • Camera is locked to an iso perspective

  • Lets assume the Pawn is a cuboid

  • My Pawn (parent class: pawn) can move forward/ backwards and keeps its momentum until you go into the opposite direction (

Problem

When I turn/ rotate the pawn, it moves into the direction the front is looking OR When I turn/ rotate the pawn, it rotates around its axis but when I i want to move forward it keeps on adding velocity to the initial forward direction

What it should do

The pawn rotates around its axis, but still moves into the initial direction. If I hit the forward key, it should move into the direction including the momentum of the previous forward direction.

Probably like Asteroids?! (Havent played it, but it looks similiar)

Note

  • The example Blueprints Ufo does it the way I would like to use it. But its key movement depends on the direction the camera is pointing. So this didn't help as my cam is locked to the pawn

  • I have tried it with torque, add force, add force at location (no idea how to get this to work properly), physics linear velocity, local offset, ...

  • I am not providing a Blueprint as I dont think it helps. I have done about 10 ways and don't know which one to show

I have tried so many ways, that I even dont know which should be used as a basis.

Thanks a lot in advance for any help please excuse my spelling

/edit please take a look at this video. the movement at 4:44 - 4:46 is what i am looking for https://youtu.be/LG1CtlFRmpU?t=4m39s

Product Version: UE 4.10
Tags:
more ▼

asked Jan 10 '16 at 02:22 PM in Blueprint Scripting

avatar image

MeMe
24 2 4 9

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

1 answer: sort voted first

If you're not already, you should probably be using ACharacter instead of APawn as the class for this actor. This has a CharacterMovementComponent that has the controls you're looking for when in "flying" mode.

more ▼

answered Jan 13 '16 at 06:30 AM

avatar image

Ryan Darcey
841 47 46 71

avatar image MeMe Jan 13 '16 at 02:26 PM

thank you for your reply

shouldn't ACharacter only be used for humanoid chars?

flying doesnt solve my issue as i need the pawn to adept to angular landscapes without adjustment by the player.

i have redone everything and went the simplest way possible. looks fine so far. but could just do a few tests, so other issues may occur.

  • for forward/ strafing i chose "linear velocity"

  • turning via localrotation

linear damping was probably the issue at the time i was asking. it was set way to high, to which my line traced "springs" responded with a lot of "grip"

avatar image Ryan Darcey Jan 13 '16 at 07:09 PM

ACharacter should probably be your starting point if your character is going to have a skeletal mesh, for sure. You still might consider it just to make use of ACharacterMovementComponent. It's does A LOT of work for you, including setting you up for networking if you ever wanna go that route.

avatar image MeMe Jan 14 '16 at 12:00 PM

thanks for the advice. will have a read into it

(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