Physics gravity direction

This forum is currently in read-only mode.
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • Would it be possible to add a Gravity Direction setting to the Physics behavior? I was tinkering around trying to make one of those roll-a-ball-around-a-maze things, where you rotate the entire screen. I'm sure there's some way to do it by adding force in a particular direction, but having a gravity direction thinger would make things easier, like:

    +Always

    • Physics: Set gravity direction to (System: Display angle) degrees

    I'm sure there would be other uses too

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't know, doing it without a special option wouldn't be that hard. To make the gravity up, for example:

    +Always

    • Add force towards X: Sprite.X Y. Sprite.Y - 32 Force: 1000

    Of course, an option would be preferable, but it's still not that hard.

  • I thought about making the gravity go in the direction of a second sprite's image point, but then there was the problem of rotation. I messed around with it a bit more and came up with this:

    http://www.fileshack.us/get_file.php?id ... g+maze.cap

    I just make the gravity controller sprite always set to the opposite angle of the display. It actually works better than I thought it would. Thanks for the inspiration, linkman.

    (By the way the new friction and elasticity settings are nice... good job guys )

  • That's a really sweet example, right there. Never even thought of doing it that way.

  • It's an old topic, sorry for uping it, but i think it would be interested to define a global gravity for every item in a specific layer =)

    A thing like that :

    Actions for "System" -> Layers -> "Set global gravity angle"

    And also a custom value on Layer properties, with default value equal to 90 (like Particles item)

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