How do I set the angle of gravity for physics

From the Asset Store
Gravity Square is a game where I aim to reach the square at the polka dot door :)
  • I have a switch the player can press to change the angle of the layout, player/player sprites and angle of gravity for the player platform. The object with physics that the player can 'shoot' out seems like it can not be changed and will always adhere to a default angle of gravity. Is there any way to change the angle of gravity for objects with the 'physics' behavior?

    Thank you.

  • If you're using the physics behavior you can't actually change the angle of gravity, but you can replace gravity altogether. If you wouldn't mind it, you can actually change gravity to either an impulse or force acting upon the object and use a variable as it's angle. So whenever the player triggers the switch, the impulse/force angle will adjust according to that.

    You can then change the angle of the sprite to the variable you used for the angle of physics.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks KTML5!

    I've played around with physics some more and will leave it to a future endeavor for now. I'll keep the information you provided me saved for when I delve into physics again. : )

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