Solid Behavior

Discussion and feedback on Construct 2

Post » Tue Nov 08, 2011 6:45 am

It seems to me that the solid behavior relies on the bounding box of an object, not it's collisional polygon. is there a way to fix that?

thanks,

Allan
B
29
S
6
G
6
Posts: 58
Reputation: 5,221

Post » Tue Nov 08, 2011 11:49 am

Ya... no have polygon collisional. Only bouding box, no?
B
212
S
38
G
14
Posts: 136
Reputation: 30,552

Post » Tue Nov 08, 2011 11:57 am

Example capx

In the image editor, click the shape button on the left under the origin button, and right click on the image.
For the sprites I used I "Guess the polygon shape", since the geometrical shape is simple enough and doesn't require more than 8 points.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
293
S
117
G
96
Posts: 7,310
Reputation: 71,069

Post » Wed Nov 09, 2011 4:38 am

Oops, my bad. I was wrong, the solids do have polygonal collision. but solids only work with objects that have the platform or 8-direction behaviors. i was programming movement through the event sheet (not using behaviors) so the solid behavior didn't work: things went right through. perhaps the dev team will fix that next release. for now, i have added an 8-direction behavior, put the default controls to no (making it useless) and collisions work :D. thanks guys!
B
29
S
6
G
6
Posts: 58
Reputation: 5,221

Post » Wed Nov 09, 2011 1:30 pm

[QUOTE=ayzhong]i was programming movement through the event sheet (not using behaviors) so the solid behavior didn't work: things went right through. perhaps the dev team will fix that next release.[/QUOTE]
This is by design! Only behaviors react to Solids automatically. Each behavior reacts differently to solids. If you move objects by events, Construct 2 doesn't know what kind of movement it is, so it doesn't know how to respond to hitting the solid. If you move objects by events, you also have to handle collisions with solids by events.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Thu Nov 10, 2011 4:49 am

ooh, that makes sense now. :D
B
29
S
6
G
6
Posts: 58
Reputation: 5,221


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests