Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Springy Pivot

ckck Posts: 224Member
edited November -1 in Working with GS (Mac)
I'd like to create an actor, whose rotation I can drag, and then it will spring back to its original position, with some "elasticity" built around its return to position.

The elasticity demo is great (I use that code a lot), but it focuses on position, rather than rotation.

Any ideas?


  • old_kipperold_kipper Posts: 1,420Member
    I think that you will be able to adapt the rules in the elasticity demo but work with positive values only for the rotation unless you want to to be able to rotate more than 180 in either direction. It makes the maths work much easier as the returns in rotation do not fall into a repeat loop past 360 or 0 which you will have to read and account for. But this might limit you if you want your actor to spring back past the 0 or 360 point. Perhaps see if you can keep it inside?

    Hope that helps....

    Cheers and hope that helps. Kipper
This discussion has been closed.