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"

Relative Velocity?

I am currently making a VR game in which you can punch things, and I used getting the motion controllers velocity to determine to do damage. Problem was, if the player walked, it would register the motion controllers velocity since it was world space. So is there a way I can make it relative to the player?

Product Version: UE 4.19
Tags:
more ▼

asked Jun 14 '18 at 12:55 PM in Blueprint Scripting

avatar image

KompaktKat
187 21 26 40

avatar image HarryHighDef Jun 14 '18 at 12:58 PM

Subtract the players velocity?

avatar image JamesGMarks Jun 19 '18 at 06:22 PM

In this case, you likely cannot directly.

Like the previous comment said, you could theoretically subtract the camera's velocity, but because that velocity could indicate a twist of the body (during a windup or follow-through of a punch, for example), it does not accurately reflect the true movement of the hand.

In fact, if your hand stood still and you removed the velocity of the camera while it moved forward, you might end up providing a non-existent velocity to the hand as a result.

For teleport movement, I might just make the hands not create physics actions until the teleport is complete.

For joystick locomotion, or when standing still you might want to try applying a minimum velocity to allow any effect.

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

0 answers: sort voted first
Be the first one to answer this question
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