How do I add gravity?

0 favourites
  • 6 posts
From the Asset Store
Customize the animation of character when item changed
  • I am fixing to add gravity to my player object so OnJump(), the player moves up then comes back down.

  • If you have a platform behavior attached this should be already apart of the custom values part.

    <. < If this is a question for you I would highly recommend you check out the construct 2 Manual

  • Hey taser, thanks for your response. Yep, I have consulted the manual but it does not document how to implement the gravity feature

  • ij3m

    Like Taser said, gravity is already build in to the Platform behavior. You can change its value in the properties panel, or at run time (if you want stronger or lighter gravity, you can also change the Angle of Gravity). The default value is 1500. As long as there is a value for gravity, everything will happen automatically. There is no need to do anything in the OnJump() event (other than change animations, or things along those lines).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • gee thanks, I will post an update.

    <!--UPDATE-->

    Having added the gravity, my player falls off the screen!

  • gee thanks, I will post an update.

    <!--UPDATE-->

    Having added the gravity, my player falls off the screen!

    Add a psychics behavior to the object you want to stand on and make it immovable.

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