Invert object gravity?

Get help using Construct 2

Post » Thu Mar 14, 2013 6:25 pm

How can I invert an object gravity ? Do you have any ideeas?
B
3
Posts: 9
Reputation: 493

Post » Thu Mar 14, 2013 6:34 pm

Set gravity to -200 instead of 200? Haven't tested, seems to me it would work :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Fri Mar 15, 2013 6:26 am

[QUOTE=vee41] Set gravity to -200 instead of 200? Haven't tested, seems to me it would work :)[/QUOTE]


Yes! you are correct, just setting the object's world gravity to a negative number will work. To make this streamlined, the action within the event causing the gravity to change just needs to be this "On Gravity Change > Action > Object/Sprite > Set World Gravity to "worldgravityVariable * -1". This will toggle it's gravity every time this event is triggered from a positive number to a negative and so on.


Paul
B
17
S
5
G
4
Posts: 24
Reputation: 4,039


Return to How do I....?

Who is online

Users browsing this forum: Jarnopa, semaso and 15 guests