physics collisions?!

Get help using Construct 2

Post » Wed Dec 21, 2011 12:44 pm

Is it not possible to write collision code for physic objects?..
I dont see any OnCollide() method that gives you access to collision
info, points of contact.. it would also be handy to disable reactions for a physical object and just use the collision data..
B
6
S
1
G
2
Posts: 37
Reputation: 1,649

Post » Wed Dec 21, 2011 3:21 pm

Sprite's ordinary 'on collision' event should fire for physics collisions too.
Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,582

Post » Wed Dec 21, 2011 11:29 pm

Thanks :)

So construct uses the polygon for collisions if one has been defined?.. are default collisions bounding boxes?... or does your system perform some sort of oldschool bitmap logic for pixel collisions?.

anyway, thanks for the feedback :)

B
6
S
1
G
2
Posts: 37
Reputation: 1,649

Post » Thu Dec 22, 2011 3:06 am

It depend on the "Collision mask" property of the physic behavior. (Check the properties bar).

If you set it to polygon, it will use the polygon. Or else, it will use the bounding box, or a circle (made out of the collision polygon anyway).
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
278
S
104
G
86
Posts: 7,313
Reputation: 84,306


Return to How do I....?

Who is online

Users browsing this forum: Christmas and 1 guest