limiting rotation?

For questions about using Classic.

Post » Thu Apr 24, 2008 9:53 pm

Isn't there a way to calculate the angle as normal, but flip the sprite graphically after the calculation?
B
2
S
2
G
5
Posts: 512
Reputation: 2,674

Post » Thu Apr 24, 2008 10:18 pm

Just checked out this thread and I think you guys missed out on a nice simple solution. Math FTW! I threw in a text object and set it to the left stick's angle. The solution was much easier to figure out when you can see the angles it needs to bound to.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Apr 24, 2008 10:32 pm

Ashley saves the day! :D You're right that is very simple, and I who thought I was gonna need a rocket science like math formula :)
You forgot the text object though, so I put one in myself, but one thing I don't get is why does the text object show the angle as 270 when the debugger shows it as 275?
B
3
G
4
Posts: 28
Reputation: 1,133

Post » Thu Apr 24, 2008 10:38 pm

I'm not sure, but I'd guess the exact time the debugger checks what the angle is, and the exact time your events change the angle, are slightly different. Nothing serious though.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Apr 25, 2008 12:52 am

Doh! That is way simple. I guess that's what I get for reading Help/Tech before I've even had my morning coffee.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests