Crash Rotation Angles
Marc_n_Soph
Member Posts: 111
Hi all, thanks for reading. Since making our first game, Dangerous Dave, we have always wanted to allow our bike actor to do backflips / frontflips, but with very limited knowledge of gamesalad, we could not work out a way to do this.
My actor has crash rules as follows
attrib: self.rotation >80
attrib: on_ground = 1
crash
attrib: self.rotation < 90
attrib: on_ground = 1
crash
Which works fine if you collide with the ground and are leaning too far back or forward, but if you do a front or backflip, the angle adds this rotation and is out of the "safe" region (so to speak), and even though the bike is the right way up, you crash.. Hope that makes sense?!?!
Really really would appreciate some help with this, QS has helped us out with a new "wheelie" move (thanks m8) , we have done some new levels, even trying to add a race mode when time trial levels have been completed, so this is the final bit we really would like to sort out for our update!!
Thanks in advance
Marc n Soph
My actor has crash rules as follows
attrib: self.rotation >80
attrib: on_ground = 1
crash
attrib: self.rotation < 90
attrib: on_ground = 1
crash
Which works fine if you collide with the ground and are leaning too far back or forward, but if you do a front or backflip, the angle adds this rotation and is out of the "safe" region (so to speak), and even though the bike is the right way up, you crash.. Hope that makes sense?!?!
Really really would appreciate some help with this, QS has helped us out with a new "wheelie" move (thanks m8) , we have done some new levels, even trying to add a race mode when time trial levels have been completed, so this is the final bit we really would like to sort out for our update!!
Thanks in advance
Marc n Soph
Comments
You're having this issue most likely because Gamesalad allows the rotation to exceed 360 degrees, and be less than 0 degrees.
There's a few ways you could get around this.
You could set the rotation = rotation % 360 if the rotation > 360 in a rule. You could figure out a similar alternative for the negative values (a bit too tired to think of this solution right now ).
The main thing I think will help you, though, is simply having your actor display its rotation via text while your still in this testing stage, so you can really get a good understanding of what's going on.
Thanks loads for that, i would have never thought of something like that, I was thinking i'd have to have a long set of safe angle zone rules or something!!!
Nice one, really appreciate it, hope I can help you out sometime. This is the most mentioned thing since we released the game... frickin' backflips... haha
Marc n Soph
Would anyone buy a game about an amateur acrobat/clown in a neck brace?
Marc
Marc n Soph