physics vs collisions question

Get help using Construct 2

Post » Fri Jan 11, 2013 2:07 am

If 2 physics objects (grenade and ground), can i use the "if collision at offset" action to determine if its going to hit the ground or not?

eg: if i throw a grenade, can i use if collision at offset Y 20 to check below it before it hits the ground?
B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Fri Jan 11, 2013 2:34 am

Probably took you longer to ask than to try ;p Yeah can't see why it won't work. I mean, you're just checking for a collision about to happen, it's not like you're changing anything that will screw with the physics.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Fri Jan 11, 2013 2:36 am

Yes.
If the event triggers it means the ground is in reach 20 pixels down.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Fri Jan 11, 2013 2:40 am

Thx, I'm stuck at work and just brainstorming possibly solutions while I wait for things to happen around here.

I wasn't sure if physics objects "collide" with each other same way in the engine as 2 sprites overlapping "collide"
B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Fri Jan 11, 2013 2:47 am

That's the thing, overlapping isn't a collision per se. It's more of a pre-collision thing. If you've ever messed about with arrays and tiles, then it's the same as that. Basically checking for adjacent tiles, but in the case with overlapping, it's pixels.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650


Return to How do I....?

Who is online

Users browsing this forum: armaldio, plinkie and 19 guests