Heartbeat, Stepped or RenderStepped for HingeConstraint checking?

Im checking the CurrentAngle of HingeConstraint, do i need to use Heartbeat, Stepped or RenderStepped for that?

Generally when detecting for changes to a property it is great to use GetPropertyChangedSignal().

Yeah i also wanted to use that but GetPropertyChangedSignal() and Changed() does not work for CurrentAngle.

Well, Heartbeat is probably the most relevant.
RenderStepped fires whenever a new frame renders, so not relevant.
Stepped fires every frame prior to physics simulation, we want it after, so not relevant.
And Heartbeat fires after every physics simulation, which is what we need.
Therefore, Heartbeat.

1 Like

Okay thanks and i found this topic: Checking for CurrentAngle Updates on HingeConstraints? - #5 by Decker004

He had the same Problem and someone said he should use Stepped, is Heartbeat yet right or Stepped, i want to be sure, thanks.

Stepped and Heartbeat are quite similar, but the only difference is, Stepped fires prior to the physics simulation and Heartbeat fires afterwards. I don’t really have much context, so I can’t tell what fits better for your case, you may as well just test each and see what works better.

Okay thanks, yeah i just want to check the CurrentAngle and then like if the CurrentAngle is over 4, i play a sound.

1 Like