Detect if physics object is on ground or not.

Get help using Construct 2

Post » Tue Jan 03, 2012 10:04 pm

Hi is there a simple way to detect if a physics object is on the ground or not.

I tried

Sytem.EveryTick                   /
     - Ball1.isOverlappingGround / Output.setText("OnGround:)
     - Ball2.isOverlappingGround /   

Sytem.EveryTick                           /
     - Ball1.isOverlappingGround{Invert} / Output.setText("NotOnGround:)
     - Ball2.isOverlappingGround{Invert} /
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Wed Jan 04, 2012 12:24 am

you can try
[code]System: Every tick
-> Ball: set onGround to false
-> Ball: set Y to self.Y+1
Ball: is overlapping Ground
-> Ball: set onGround to true
System: Every tick
-> Ball: set Y to self.Y-1[/code]

It's move down -> check -> move back up every tickYann2012-01-04 00:25:25
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346


Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 19 guests