orbit around point with key controls
SEMA
Member Posts: 161
I know this have been covered many times but I want to do a project: let's say if the mouse button is down the actor will orbit clockwise and if I release it counter clockwise.
Comments
help
Constrain X to radius
*
cos(self.rotation)+X centre pointConstrain Y to radius
*
sin (self.rotation)+Y centre pointWhen mouse button is down:
--Rotate Clockwise
Otherwise
--Rotate Counter-Clockwise
Smoother version (a less mechanical change in direction)
Constrain X to radius
*
cos(self.rotation)+X centre pointConstrain Y to radius
*
sin (self.rotation)+Y centre pointWhen mouse button is down:
--When Angular Velocity > -90
----Constrain Angular Velocity to Angular Velocity-5
Otherwise
--When Angular Velocity < 90
----Constrain Angular Velocity to Angular Velocity+5
@SEMA
Here is another simple way:
In the actor, under Motion, set the X to some offset like 200, and Pin to on.
Then use the rotate behavior:
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
@Socks amazing thank you
Neat !