Physics Gravity Direction

Get help using Construct 2

Post » Sun Jan 22, 2012 3:10 pm

Hi, I am wondering if there's a way we can change the direction of gravity with objects using the physics behaviour.

I know you can add forces to objects, but forces affect each object differently depending on their mass. A large (heavy) object will fall at the same speed as a smaller (lighter) object with gravity... but with forces, the large object is slow, but the small objects are fast. Is there a way to make it constant, without changing each object's mass?

Hope you guys can help!
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 931
Reputation: 9,360

Post » Sun Jan 22, 2012 3:12 pm

System.Everytick apply impulse?
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Sun Jan 22, 2012 3:44 pm

You have to set the "World Gravity" to Zero and the do an "Apply force towards" in each Tick. Works quite good....

BTW: you can use "negative force" to pull objects towards somethingWeishaupt2012-01-22 15:46:15
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Sun Jan 22, 2012 4:04 pm

I'll try impulse instead of force, but force doesn't work as expected.

I'll let you know :)
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 931
Reputation: 9,360

Post » Sun Jan 22, 2012 4:10 pm

What is the effect you expect from force that you do not get? Gravity as it is, is a force, not an impulse...
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Sun Jan 22, 2012 4:11 pm

:( No, impulse doesn't work either... Small objects move faster than the large. Will I have to set the mass to the same?

**EDIT** Can't figure out how to change the mass... :(AnD4D2012-01-22 16:14:14
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 931
Reputation: 9,360

Post » Sun Jan 22, 2012 4:13 pm

If you look at gravity, it does not really matter if an object is huge or small. Gravity applies a force of 9,81 m/sec ....mass makes the difference. It may be, that the pyhsics engine is not good with mass, so you could tune this with different forces...

Force is an "equal" pull - impulse is a "hit"Weishaupt2012-01-22 16:14:46
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Sun Jan 22, 2012 4:17 pm

Hi Weishaupt!

I did originally have the object set up as force... but it didn't work too well. The smaller the object, the faster the force moved it. I wouldn't have thought it would effect this. I have gravity set to zero, but no luck...
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 931
Reputation: 9,360

Post » Sun Jan 22, 2012 4:19 pm

I have to see the CAPX to help you furtherWeishaupt2012-01-22 16:20:03
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Sun Jan 22, 2012 5:11 pm

@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 931
Reputation: 9,360

Next

Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, Justin1967 and 31 guests