AngleReached for HingeConstraints and PositionReached for PrismaticConstraints

Hi,

The new constraints are cool, but utilizing the HingeConstraints and/or PrismaticConstraints in combination with a Script can sometimes be a bit awkward. There’s no way to figure out when a HingeConstraint reaches the TargetAngle/LowerAngle/UpperAngle and there’s also no way to figure out when a PrismaticConstraint hits the TargetPosition/LowerLimit/UpperLimit. In order to figure this out you’ll need to run a loop at a high rate which in my opinion isn’t a clean solution.

If there were an AngleReached event for HingeConstraints which would trigger whenever CurrentAngle reaches LowerAngle or UpperAngle it’d make these kind of problems easy to solve since you could just enable the limits, set LowerAngle to -180, UpperAngle to 180 and then use the Event to keep track of how many full circles the handle has already made. You could also use it to make a platform pause for a few seconds at a certain angle, make a spinner change direction whenever it reaches one of the limits and so on.

If there were a PositionReached event for PrismaticConstraints which would trigger whenever CurrentPosition reaches LowerLimit, UpperLimit or TargetPosition, it would make these kind of things a lot easier to program:

  • An elevator system which would open the doors whenever TargetPosition is reached.
  • A shuttle (train) which explodes when it hits the LowerLimit or UpperLimit on its lineair track with too much speed.
  • A high striker which would ring a bell when the block hits the UpperLimit.

What do you guys - and girls - think? Do you think these two events (or something similar) would be useful to you? What would you use them for if they were to be added?

10 Likes

Yes PLEAAAASE this would be amazing.

1 Like

cc @chefdeletat

Agreed this would be an useful event. We’ll look into it

5 Likes