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.
User avatar
TheOriginalCj
Moderator
Moderator
Posts: 141
Joined: Tue Mar 15, 2016 10:28 pm
Title: Wiki Guy
SFD Alias: RedneckJed
Started SFD: PreAlpha 1.1.0
Location: USA
Gender: Male
Contact:
Status: Offline

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

Postby 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!


Hjarpe wrote:
Splinter wrote:Hmm, I wonder what happens if I burn my pants. Let's find out.

In-game I hope.

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

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

Postby 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


Return to “Superfighters Deluxe Problems and Bugs”

Who is online

Users browsing this forum: No registered users and 2 guests