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"

HTC Vive How To Control Character Movement Speed

I went through this documentation from Epic to set up the VR_Pawn in UE4 using the HTC Vive. Everything is working as expected.

I would like to play around with changing the movement speed of my pawn. Basically as I move in the real world I want to travel at a further rate in the virtual world. I was hoping to try this out with using a movement speed, but because you have to create your own pawn class there doesn't seem to be any way to get to the movement speed.

Does anyone know how the vive applies motion to the virtual camera in UE4?

Thanks in advance,

NickZ. :)

Product Version: UE 4.11
more ▼

asked May 19 '16 at 04:42 AM in Blueprint Scripting

avatar image

203 14 19 148

avatar image NymKappa Jun 08 '16 at 08:50 AM

I'm looking for quite the same thing. I need to know the speed of the player. Did you find any infos about this ?

avatar image NickZucc Jun 08 '16 at 11:46 AM

I have not discovered this yet. I have also noticed that the VIVE doesn't allow you to step up on rising platforms the same way that the Oculus does as well. Part of me wonders of the VIVE is locked down in some way to always maintain the 0, 0 at the origin of the room scale space. If you teleport you move that whole volume to a new location, but if you want to play with the speed in that volume I am still not clear on how to make this happen!

avatar image NymKappa Jun 08 '16 at 12:45 PM

For now I'm just calculating the speed by myself. I first save the current position of the camera, then compare it with the new position 100ms later so I can approximate the player speed. If you want for example making your player moving faster, I think you have to play with the room scale. For example if you want your player to be 2X faster in the virtual world than in the real world, scale your virtual world by 0.5 (it will also scale the Z though...)

avatar image cheesepants Jan 10 '17 at 09:02 PM

Can you give a screen shot? I am trying to do the same with the motion controllers. The velocity vector yields nothing. While the Get World transform on the motion controllers work. But I am not sure how to store the time for every tick.

avatar image NymKappa Jan 10 '17 at 09:54 PM
  1. Just create a timer (float variable) and reset it to 0

  2. Save the current position of your MotionController into another variable.

  3. Increment the timer using DeltaTime in the Tick event.

  4. When it's over 100 ms, get the new MotionController position. Substract it with the previously saved one and calculate the lenght of the result vector :). This is your velocity over 100 ms

  5. Restart from 1... etc etc ^^

(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