Constraint Read-only properties

I am currently developing a vehicle system that utilises Roblox’s constraints, which so far is going very well.

The Project
I have completed the majority of the work, which you can see here:
Controls:
F = Footbrake
G = Handbrake

The Feature Request
It would be awesome to have direct feedback from constraints. For example:
In my cars I use Hinge Constraints to drive the wheels, but I do not know how fast each individual wheel is rotating (rpm).
The same is true for other constraints (spring, rope, prismatic joints etc).

For just the hinges alone would be useful for things like traction control, ABS, and probably a lot of other use cases unrelated to cars.

1 Like

You can get the relative velocity of the parts like this:
a0 = hinge.Attachment0 on wheel
a1 = hinge.Attachment1 on body
relVel = dot( a1.AxisInWorld, a0.parent.RotVelocity )
Result is in radians by second so pretty easy to get RPM.

5 Likes

Oh cool, I completely forgot about those properties!

Thanks I’ll try that later. :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.