How do I Rotate an object to keep it flat against an object?

0 favourites
  • 10 posts
From the Asset Store
Simple resize and rotate events for any sprite, quick and easy event sheet that you can use for your own projects.
  • How do i rotate an object so it stays flat on a other object?? look at image to see that i mean!

    I want the snowmobile to stay flat against the ground!

  • Depending on the way you have things set up there are many ways..

    One of the easiest ways would probably be to have invisible objects following the angles of your slope and setting the angle of your snowmobile based on overlapping at offset of those objects..

    Not sure if it's possible in your case, but dividing your snowmobile in front and backtires would even make this more realistic..

  • Yeah, also how do i do a screen effect? i made a gif of snow and i have imported the animation, but now i want to give it a clear background?!

  • Best way would be to import it with a clear background..

    Using effects is much more intensive to render..

  • okay thanks, sorry for all the questions but how would i make sure that an event only happened once or only when covering a certain sprite?

  • Using a triggered event would be the way to only trigger once..

    If you only want something to happen when covering another sprite, you could check for overlap or maybe on collision, whichever suits you best..

    As these are pretty basic questions, have you followed any of the beginners tutorials?

    Read the "how events work" section of the manual?

  • youre not getting what i mean... heres the situatuion:

    The player runs up to the snowmobile

    Event: the player gets on the snomobile and speed is increased same with acceleration

    the snowmobile breaks after taking too much damage and the character is kicked off it

    I now do not want the player to be able to get back on the snowmobile. i tried setting the snowmobile to be destroyed but then it just dissapeares...

  • Well a simple instance variable would take care of that, added as a condition in the collision event..

    For example a boolean variable AlreadyUsed..

    So when the player is kicked off the snowmobile set it to true..

    And in the player collision event check if it's set..

    If not, player can mount the snowmobile..?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • thanks, how do i make a text box say the contents of variable? ive tried on what it says in the beginners guide but it doesnt work. my variable doesnt come up.

  • " ive tried on what it says in the beginners guide but it doesnt work" - try it again, you have probably made a mistake. Look at the example and work out what it is doing...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)