Is there a Physics Constraint 'Spring' Actor?

Hello, all!

What i need to get working is a sort of physics driven spring actor. Basically, there will be a physics object that has a force that keeps it in a default position. If an outside force moves it, it would oscillate back to the default position.

Looking into the Physics constraint documentation, I can’t find a type of ‘spring’ setting, all the options seem to just have varying degrees of simply swinging freely.

Is there any way to get this working?

Thanks in advance!

~

The Physics Constraint has a “LinearMotor” category that contains a Position Drive (spring) and a Velocity Drive (damper). The easiest way to make a spring is by enabling the Linear Position Drive and setting the “Linear Position Strength” to the spring constant you want. You also need to set the set the proper axis (XMotion/YMotion/ZMotion) to “free”.

This example makes a spring-damper in the Z-axis of the constraint component.

linearmotor_UE4.jpg

oh, wow! Okay, thanks so much!!