Rotation not working?
kjfluke
Member, PRO Posts: 23
I am using a simple spinning wheel mechanic in a prototype for a game. Pretty straight forward. I am calculating the result of the spin by the angle range of the actor. (if rotation > 30 and < 180 change attribute...) The problem is that after one complete rotation, the angle of rotation is registering higher and higher rather than starting over at 0. I could have it reset to 0 at 360, but that might make it choppy and I feel like I am maybe just missing something. How can I make the rotation give me an angle between 0 and 360 only?
Comments
@kjfluke
mod(self.Rotation,360)
or
assign it to an attribute of type Angle
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com