RotVelocity.Magnitude doesn't seem to be working properly

Have you tried out my answer?

I’m trying it out right now, I’ll let you know of the results. Thanks!
I had a question by the way. About the :Dot()'s Vector3 value, if the wheel’s RotVelocity changes on the Z axis when it spins, should I use Vector3.new(0, 0, -1)?

Another question, what unit will the value printed be in?

Radians per second.

Use the axis of the hinge.

I use -1, 0, 0 here. You can see by the red arrows (indicating the X axis) that the vector points outward from the front left wheel.

Remember to use VectorToWorldSpace as the RotVelocity is absolute and the axis of rotation is not.

My chassis uses:

local wheelRotVelocity = wheel.RotVelocity:Dot(wheel.CFrame:VectorToWorldSpace(Vector3.new(-1, 0, 0)))

As a note to anyone who reads this, me and Terrodactyl played around with both the equations he provided on Discord, yet we did not get desired values.

On your chassis - something weird is going on there, because it works fine on mine.

It’s really strange, as it didn’t even seem to work properly on a loose cylinder. I’ll try again and let you know.

I can prepare a demo if you want?

1 Like

Sure! I’d love if you did so for me.

1 Like

Super confused about this, tried a load of things but still not getting a proper wheel RPM value. Please help ;(

If your wheels are on an axle, have you tried measuring the RotVelocity of the axle? Velocities can be weird and relative sometimes.

Thank you all for your help! I came up with this formula:
wheel.RotVelocity:Dot(-axle.CFrame.rightVector)
and it seems to be working!

2 Likes

That’s odd, that’s what I was doing with the wheel.CFrame:VectorToWorldSpace(Vector3.new(0, 0, -1)) thing, although if your axle is a Part then it’ll be different. Glad you figured it out!

Make sure to subtract the RotVelocity of the body by the way.

Yep! Just ran into a new problem :laughing:. When a character is in the VehicleSeat, the values returned are incorrect. Might be why it took be so long to troubleshoot this issue.

I would say that has to do with network ownership, but velocity is replicated as far as I know.

Nope, I had already tried with Network Ownership on the client and the server.

I just told you that it would’ve been my first guess but it’s not the problem.

Yeah. BTW any idea what unit is HingeConstraint.MotorMaxTorque measured in?

Torque. It’s measured in torque. I’m afraid I can’t tell you exactly what that means, but ROBLOX has its own unit for torque. I think it’s on the wiki somewhere.

Edit: CylindricalConstraint | Documentation - Roblox Creator Hub

The units are mass * studs^2 / second^2.

1 Like

Mhm. Alright. Was just asking because I’m more used to pound-feet lol. Thanks!