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
5
G
6
Posts: 58
Reputation: 5,121

Post » Tue Nov 08, 2011 11:49 am

Ya... no have polygon collisional. Only bouding box, no?
B
203
S
37
G
13
Posts: 136
Reputation: 29,523

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
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

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
5
G
6
Posts: 58
Reputation: 5,121

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
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Thu Nov 10, 2011 4:49 am

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


Return to Construct 2 General

Who is online

Users browsing this forum: Avengium, MadSpy and 11 guests