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. 

How do i Get The Vertical Velocity?

Basically i am trying to implement fast fall, which check the velocity of the player, if the velocity is negative, if the player hits the "down" button (in this case 's') it should set the downward velocity to -600, but how do i access the Component's velocity and modify it? what is the function call to accomplish this? i've tried googling but the ue4 api documentation is god awful and google has returned nothing.

Product Version: Not Selected
Tags:
more ▼

asked Mar 03 '15 at 04:44 AM in C++ Programming

avatar image

Mike Jazzi
0 1 2 2

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

1 answer: sort voted first

If you're using Z as gravity then you simply get the Z component of your velocity vector.

 float VerticalVelocity = GetVelocity().Z;
more ▼

answered Mar 03 '15 at 04:59 AM

avatar image

Cobryis
472 33 18 47

avatar image Mike Jazzi Mar 03 '15 at 05:15 AM

it doesn't allow me to call that function from within the c++ component i'm in. which is added to the actor component.

avatar image Cobryis Mar 03 '15 at 05:17 AM

You can get the owning actor with GetOwner(), or you may be able to access the velocity by using the UpdatedComponent or the UpdatedPrimitive.

avatar image Mike Jazzi Mar 03 '15 at 05:59 AM

okay, i'm switching the way i'm doing it. i wan't to make an input named "Fall" which accepts the S key, i understand i can do that in the project setting which i did but not sure how i can access that command via code, for example in the "ClashCharacter" which is the only character in the frame. i see the other inputs like "MoveRight" is called by InputComponent->BindAction(args) now how can i make an action called "fall", since whenever i try to do it return me the error "Fall is not a member of class "aClashCharacter"

(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