Continuing the discussion from What are you working on currently?:
It came up in discussion that there wasn’t really a good way to have branches of a tree compress when the tree fell. HingeConstraints can already accomplish a similar effect with a server actuator:
But hinges don’t work quite well for tree branches since they can only be pushed in one direction. BallSocketConstraints are more appropriate for tree branches that can bend in any direction. Unfortunately, BallSocketConstraints don’t have any sort actuator functionality, so we can’t make the constraint “stiff” so to speak. With a servo actuator though, we could link up the branches of the tree with BallSocketConstraints, have them stay stiff, but upon being pushed enough give way.
- Tree branches bending when a tree topples over
- Foliage collapses as you drive over it but pops back up when you drive off like in Arma
- Apply occasional thrust to nearby tree branches to produce the effect of the trees swaying in the wind
- An antenna on a vehicle that can be pushed in any direction but pops back to straight afterwards
- Training dummy that pops back into place after being hit
- Fishing rod bending and snapping back into place when force is removed
We would need some sort of min/max/target angle properties like we have on HingeConstraint, but they would have to be a Vector2 or Vector3 (if BallSockets allow rotation around Y axis) as opposed to a single number. It’d also be useful to have a CurrentAngle property so we could do cool stuff like have objects permanently snap (but remain attached – current BallSocket behavior) once they reach a certain angle threshold or even break off completely.