I'm making a custom camera for a racing game and I want it to swing side to side when the player turns the vehicle.

I came up with this which returns how fast the vehicle is spinning but the camera will only swing to one side because it doesn't check which direction it is spinning.

(Part.RotVelocity * Part.CFrame.upVector).magnitude

3 comments

1

You can check if the A or D key is pressed ;)

0

PhaZeRO, you can use .Direction <--- I'm pretty sure that works. It would be like (Part.RotVelocity * Part.CFrame.upVector).Direction

0

lol it's v.Unit not v.Direction. And in reality all vectors have a direction; unit only gives you an equalized version which is more useful.