Gravity issue

suntzumobilesuntzumobile Member Posts: 34
edited November -1 in Working with GS (Mac)
Hi everyone. I've created some mountains that are moving to the Left X position. I have gravity so its making them fall below the screen. How can I have gravity and make these actors move without deselecting the movable box on the actor. Please be descriptive Im new at this. Thank you very much.

Comments

  • joshmiller602joshmiller602 Member Posts: 206
    If the actor is just moving left. I would just constrain the y axis, so that it wouldn't go down.

    Constrain Attribute: self.Position.Y to "151" -- Or wherever it currently is on the board" (You can see the current Y position if you look under "Position" while editing the actor.)
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    have them accelerate up at the same rate as your gravity

    Acc and gravity are basically the same thing and work at the same rate.

    This will cancel the gravity out.

    Option B.... My favorite.
    Is only add accelerate down on the things you want to have gravity.

    A physics engine is great for lots of pieces flying around like in angry birds but, keep in mind most games didn't have that. Mario went up and down without gravity.

    Just something to keep in mind.
  • joshmiller602joshmiller602 Member Posts: 206
    JamesZeppelin said:

    only add accelerate down on the things you want to have gravity.

    A physics engine is great for lots of pieces flying around like in angry birds but, keep in mind most games didn't have that. Mario went up and down without gravity.

    Just something to keep in mind.

    Great Tip! I think most people starting out don't even think about that.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    joshmiller602 said:
    Great Tip! I think most people starting out don't even think about that.

    Yeah I'm not sure if it mentions it anywhere to obvious.

    When i first started on Game Salad i tried to recreate some of the demos from scratch.
    I found that in the cannon demo.
Sign In or Register to comment.