Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Sprite Angles With \ Without Physics

Author
Message
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 15th Aug 2012 23:10
Hi All

Can anyone tell me my when sprite physics are OFF, sprite angles (in degrees) go from 0.0 to 360.0 and 360.0 to 0.0 respectively.

However, with sprite physics turned ON, angles go from 0.0 to 180.0 to -180.0 to 0.0???

Is this a Radians thing or am I missing something and as usual making a buffoon of my little self?

Any help much appreciated!

Constantly seeking!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th Aug 2012 00:16
Not a radians thing, probably a box2d thing. It all equates to the same thing though really. You could use a wrap function to keep the numbers within what you need.


this.mess = abs(sin(times#))
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 16th Aug 2012 19:34
Emma that's what I Hoping. However for consistency for AppGameKit users, AppGameKit should manage this internally as the GetSpriteAngle will return a strange number between 0 and 180 either positive or negative. Although not rocket science to manage this, I would have thought it better that when calling GetSpriteAngle, the result should be the same physics or not!

thanks for the conformation BaxSlash!

Constantly seeking!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th Aug 2012 21:22
Can I suggest you post it as an enhancement request?


this.mess = abs(sin(times#))
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 16th Aug 2012 23:19
Quite right baxslash.... Was on a rant..will do just that.

Constantly seeking!

Login to post a reply

Server time is: 2024-05-05 22:31:47
Your offset time is: 2024-05-05 22:31:47