Off-Centre Pivot Point

SocksSocks London, UK.Member Posts: 12,822
edited February 2015 in Working with GS (Mac)

This is another question that comes up from time to time, how to rotate your actor around a point other than its own centre . . . I know it's been addressed in the past (for example RThurman did a great demo a while back), but I thought it would be useful to have a fully interactive project, where you could simply move the pivot point to where you need it to be.

GS project attached.

You can move the actor and/or the pivot point, change the size of the actor, the actor's rotation and so on . . . and it will always rotate around the pivot point.

It should be fairly straightforward to copy this system into your own project as there are only two actors, the pivot point passes its X and Y to the main actor via two game.attributes, so pretty easy to set up.

Comments

Sign In or Register to comment.