How do I create a physics sprite that defies gravity?

Get help using Construct 2

Post » Sat Feb 22, 2014 6:44 am

I have a jumping game that uses objects with physics and gravity.

I'd like to have some objects - helium balloons - that float or hover in the air, yet also have physics properties - such as the player pushing them out of the way.

Does anyone know how I can create these kinds of sprites - with physics, but defying gravity?

Every time I try to make this kind of object, it always immediately falls to the ground. :roll:

Thanks!
B
4
Posts: 10
Reputation: 220

Post » Sat Feb 22, 2014 7:16 am

I am not sure at all it'll work, but:

you can try to set an acceleration upards, the same value as the gravity, when the object is created (It should stop the falling), then add a velocity upwards too
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Sat Feb 22, 2014 8:45 am

As Aphrodite says

every tick - Balloon apply physics force (0,-gravity) at image point 0

But also make sure to:
set balloon density to 0
set balloon damping (both) to a high number (0.9 ?)
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Mon Feb 24, 2014 1:44 am

Thanks to both of you - worked great!
B
4
Posts: 10
Reputation: 220


Return to How do I....?

Who is online

Users browsing this forum: dop2000, R0J0hound, StillSarah and 22 guests