Velocity is not changing? [VR]

I am trying to get the velocity of my hand so I can apply that to the object that I want to throw, however, when I print out the velocity of every part in the hand the velocity is 0,0,0 but how can this be? I have no clue. I am trying to implement throwing into my VR game, here is a little video.

The code is as simple as

Part.Velocity = RightHand.Palm.Velocity

I did not print it out, as I don’t think its needed as I have previously done it.

Your hand’s position / orientation is updating by CFrame and doesn’t have a velocity. If you want to get the velocity of an anchored object you can put this into a RenderStepped.

local LastPosition = Part.Position
local Velocity = Vector3.new()

RunService.RenderStepped:Connect(function(Delta)
    Velocity = (LastPosition - Part.Position) / Delta
    LastPosition = Part.Position
end)

I just wrote this on the spot so you may need to change this to get it working.

1 Like