New to the forum? Say hello in this topic! Make sure to read the rules.

IObject GetAngle() doesn't retrieve a number or send a null when called if that object is at 0 deg/rad.

Did you encounter a problem, exploit, glitch or bug while playing the game or running the dedicated server software? Tell us about it here.
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
Post Reply
User avatar
TheOriginalCj
Moderator
Moderator
Posts: 160
Joined: Tue Mar 15, 2016 10:28 pm
Title: I'm the Wiki Guy
SFD Alias: RedneckJed
Started SFD: PreAlpha 1.1.0
Location: USA
Gender:
Contact:

IObject GetAngle() doesn't retrieve a number or send a null when called if that object is at 0 deg/rad.

Post by TheOriginalCj » Sat Dec 31, 2016 8:12 am

So I was working on a method to test to gather the angle of an object and continue a process, however, what was peculiar was that when the object angle was 0 (or what I could assume was normal object orientation), when using GetAngle() neither a number value or null was obtained.

Maybe it's just me, or how I'm trying to get the data, I was testing to see if the angle of the requested object was 0.
0 x
Superfighters Wiki Founder
The Superfighters Wiki
Join the Wiki!
KliPeH wrote:
Lunatic wrote:And here I expected a joke.
here's a joke
SFD competitive mode

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 795
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 27

Post by Gurt » Sat Dec 31, 2016 11:09 am

Always provide a sample map illustrating the problem. You get the angle directly from the box2D body. Sometimes under extreme conditions the box2D engine won't coop anymore and can return NaN or Infinite for certain values (depending on what you do in the box2D world). I assume this is what happened.
0 x
Gurt

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests