Need help with aircraft orientation after plane rotates left or right please! :O

quantumsheepquantumsheep Member Posts: 8,188
edited November -1 in Working with GS (Mac)
Hello everyone!

Maths time, I think!

I was messing about with Attack of the Kraken for the update, and something has irked me since that game. Mainly, that the player rocket is always orientated the right way because it's symmetrical.

i.e. it has no proper 'up or down'.

Video Here:



I was just mucking about with it and wondered if anyone had any ideas as to how to make a plane (with a cockpit on top) 'flip' so that its belly is always facing the ground.

At the moment, the plane loops the loop but is 'upside down' when flying to the left.

Am I making this clear? Do you get where I'm coming from?

I've personally no idea how to implement this, so I'd really love some help!

To recap:

Plane flies to the right with cockpit on top of graphic.

When plane rotates right or left, and ends up flying to the left, the plane is upside down (cockpit on bottom)

Many thanks in advance for the people far cleverer than I!

Cheers,

QS :D

Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    maybe when the rotation is greater then one rotation point, and less then another (to find the exact roation when its upside down) change image to a upright version?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    you could do an animation of the plane rolling any time you rotate over 90degrees up or down. If you make the animation fast enough I think you could implement that fairly smooth so that even when you go up and start to rotate one way if you change half way through it could rotate back quickly.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    damn john beat me while I was typing out my long explaination
  • quantumsheepquantumsheep Member Posts: 8,188
    JohnPapiomitis said:
    maybe when the rotation is greater then one rotation point, and less then another (to find the exact roation when its upside down) change image to a upright version?

    Thanks for the response - I think I did try that - lemme check...

    Right - I have:

    If self rotation is less than or equal to 90
    or
    If self rotation is greater than or equal to 270
    Change attribute game.moveleft to false.

    I also have:

    If self rotation is greater than 90
    or
    If self rotation is less than 270
    Change attribute game.moveleft to true

    I then put change to a left facing graphic in to the 'moveleft is true' bit and a right facing graphic in the 'moveleft is false' bit.

    The left facing graphic comes on but seems to clash with the right facing graphic (i.e. it'll come on and off)

    I may have my angles wrong... but I did attempt it at least!

    Any other thoughts on what I've done spectacularly wrong?

    Cheers,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • PortymanPortyman Member, PRO Posts: 409
    I would use a change image when the rotation is flipped to make it look like it is upside down, and I would compare the actors rotation to lets say 45 and when the rotation is greater than 45 change image to right side the plane. You would also have to change the image when the angle is less than 315. I hope that make some sense.
  • PortymanPortyman Member, PRO Posts: 409
    Crap, I got beat out also,,,,,
  • quantumsheepquantumsheep Member Posts: 8,188
    Thanks all for your responses - I'll do some tests with a new demo and just the rotation.

    Any help in the meantime would be appreciated - I just think it's more complicated than it might at first seeem!

    Cheers,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    you can also try self angular velocity instead of rotation. But i think if you play around with the numbers it should work fine :) It seems like you might need a bigger gap because its switching so quick. I did something like this before and that was my problem

    Ill try to find a range for the numbers for you
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    sorry for beatin you guys, i was typin up a storm all jacked up on redbull :p
  • quantumsheepquantumsheep Member Posts: 8,188
    Well I've had no luck with it at all - I'll post what I have so you can have a good laugh! :D

    http://gamesalad.com/game/7100

    Press left or right to rotate the plane :(

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    sheepy whats your email, i think i have something for you :)
  • BackUpAndDownBackUpAndDown Member Posts: 685
    Hey, I'm sorry I don't know of any tricks that will help you but I was wondering, How have the sales been with this game? It looks pretty cool.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Dammit, just relized wat i did works for keeping the cockpit up, but then projectiles dont shoot right :(

    Ill keep playin around with it though
  • quantumsheepquantumsheep Member Posts: 8,188
    JohnPapiomitis said:
    Dammit, just relized wat i did works for keeping the cockpit up, but then projectiles dont shoot right :(

    Ill keep playin around with it though

    Thanks man, I appreciate it! :D

    If you let me know *your* email address, I can send you a quick demo of what I have...
    BackUpAndDown said:
    Hey, I'm sorry I don't know of any tricks that will help you but I was wondering, How have the sales been with this game? It looks pretty cool.

    Sales, as with all my titles, have not been great at all (though to date it's my best selling title!).

    An update has been submitted to Apple, and I'll be reducing the price in the new year to $.99

    As I was doing the update I realised I really like the controls and the movement, so I'm experimenting with a new game idea based off it. It's already got some major additions to it which I'm quite excited about :)

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    papiomitis@yahoo.com

    :)
  • quantumsheepquantumsheep Member Posts: 8,188
    Email sent, John - thanks for the offer of help :)

    It's 8am - I'm off to bed I think!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    quantumsheep said:
    Email sent, John - thanks for the offer of help :)

    It's 8am - I'm off to bed I think!

    QS :D

    Anytime :)

    Its 4am here, and im wide awake haha
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Your gonna love me, check your email :D
  • quantumsheepquantumsheep Member Posts: 8,188
    JohnPapiomitis said:
    Your gonna love me, check your email :D

    I love you! :D

    Thanks John - you fixed that dead quick - and yes, I was right - it did involve nasty maths!

    Cheers for the help fella! Your name in lights (or in the credits rather) if the game ever gets published.

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    quantumsheep said:
    I love you! :D

    Thanks John - you fixed that dead quick - and yes, I was right - it did involve nasty maths!

    Cheers for the help fella! Your name in lights (or in the credits rather) if the game ever gets published.

    QS :D

    hehehe :) Anytime buddy, i glad i was able to fix it for you ! Talk to you later!

    John
Sign In or Register to comment.