Hi there,
currently I am facing a problem, when I use XRGrabinteractable to throw object, it is not perfet smooth but is good enough, the object will be added a velocity when it detached, if I don’t move, it works good, but if I throw the object when I am moving, the object seems like is added a additional velocity from my movement, which I don’t want happen. For example, I just release the object when I am moving and it will move in the same direction as mine (it is logical but not for my case suitable). How can I avoid this?
Any help would be appreciated
Best regards
Weimmer
1 Like
I dug into the code and the throw velocity is the product of “Throw Velocity Scale” and the world-space velocity of the intractable being thrown. This is a problem if the player is walking or XROrigin is being moved with a vehicle or platform because the locomotion or XROrigin movement is also being multiplied by “Throw Velocity Scale”. The calculation of the throw velocity needs to multiply “Throw Velocity Scale” by the movement of the intractable relative to the player then add the player velocity and the velocity of the XROrigin. This is borderline impossible, however, because it would mean tracking the location of the interacting player and tracking the velocity of XROrigin in the intractable. The only correct solution is setting “Throw Velocity Scale” = 1.
@VRDave_Unity Do you have any thoughts on how we could achieve the correct “Throw Velocity Scale” effect while moving? I’m trying to throw spears from a horse.
I got the same problem, did you find a solution? @bbroderick