Physics behavior with zero gravity

For questions about using Classic.

Post » Mon Feb 09, 2009 11:42 am

Hi, can you tell me, how to make working physics collision between objects if gravity equal to zero?
That didnt work, my objects just scroll throught another objects like ghosts. :(
B
1
G
3
Posts: 4
Reputation: 833

Post » Mon Feb 09, 2009 12:26 pm

Did you tick "solid" under groups -> attributes for the objects in question?
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Mon Feb 09, 2009 2:05 pm

Didnt work anyway =(

[url:1dqy7jes]http://rapidshare.com/files/195962607/phys.cap.html[/url:1dqy7jes]

i want to use physics in my top-down game, but that didnt work without gravity checkbox checked and worldgravity greater than 0.05
B
1
G
3
Posts: 4
Reputation: 833

Post » Mon Feb 09, 2009 3:10 pm

I did some further tests and it seems you're right. Physics won't work without gravity which is strange. Anyway I found a work around..

If you set just one object (in your example the blue square) to have gravity. And in the ALWAYS event (couldn't get it working in START OF LAYOUT), set GRAVITY ENABLED to 0. Seems to work.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Mon Feb 09, 2009 3:45 pm

Ah you see your using actions in the Sprite to move it...which is more like repositioning it. You need to click the physics tab and select 'add force' or 'set velocity', otherwise the physics shapes 'fall asleep' because they think they aren't moving.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Mon Feb 09, 2009 6:04 pm

That explains a lot then!
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Mon Feb 09, 2009 9:20 pm

Thanks alot!! that really help!!!
B
1
G
3
Posts: 4
Reputation: 833


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests