Page 1 of 1

Boxed Collisions

PostPosted: Wed Dec 05, 2007 2:09 am
by Azu
How do I not have an background or object with out a box collision? I made a curve, yet it still has a box collision. Also, how do I rotate objects in the animation editor.

Re: Boxed Collisions

PostPosted: Wed Dec 05, 2007 2:20 am
by deadeye
[quote="Azu":3f5rx2xi]How do I not have an background or object with out a box collision? I made a curve, yet it still has a box collision. Also, how do I rotate objects in the animation editor.[/quote:3f5rx2xi]

Under the sprite properties, set the collision to Per Pixel. I think it's in the Attributes section, but I'm not sure right now (posting from my Wii).

As for rotations, you can make new angles from the Animations bar, not in the picture editor.

Re: Boxed Collisions

PostPosted: Wed Dec 05, 2007 4:30 am
by Azu
Yeah, I did that, but it shit has a box. I'm using the Physics movement by the way.
See, I want to make a pinball-type game.
Actually, i want to create a Peggle clone.


http://www.youtube.com/watch?v=eMUZTZydv7I
http://www.youtube.com/watch?v=vQ5-xudVd1k

Re: Boxed Collisions

PostPosted: Wed Dec 05, 2007 4:43 am
by vinny
[quote="Azu":qofk9ur8]Yeah, I did that, but it **** has a box. I'm using the Physic movement by the way.[/quote:qofk9ur8]

it's hard to imagine that was spelt accidentally lol :P

Re: Boxed Collisions

PostPosted: Wed Dec 05, 2007 5:46 am
by Azu
Edit my post. But yeah, any help would be grateful.

Re: Boxed Collisions

PostPosted: Wed Dec 05, 2007 6:59 am
by deadeye
Ah, I see. I was actually wondering if you were after I made my reply. The physics movement doesn't have per-pixel collisions, at least not yet. Your only choices currently are bounding box or ellipse. You should use ellipse for your balls and pegs, since they're round. Curved surfaces, or the slightly curved bricks like in Peggle won't be able to be recreated accurately. You'll have to stick with either circles or rectangles. For now, anyway. But, hey... the nice thing about open source is that someone could come along and add that feature.

Re: Boxed Collisions

PostPosted: Wed Dec 05, 2007 1:18 pm
by deps
Or fake it! :)
Create the playing field out of rotated boxes. Then put the real graphics on another layer on top of it so they isn't visible to the player.
Will be a bit difficult to get nice curves...

Re: Boxed Collisions

PostPosted: Wed Dec 05, 2007 2:29 pm
by Azu
I suppose. Anyways, I have another problem. I have an event where the ball hits the bricks, it destroys it. Only problem, it's not.

Re: Boxed Collisions

PostPosted: Wed Dec 05, 2007 6:40 pm
by deadeye
Yep. Another limitation of the physics movement. The physics engine updates before your event sheet runs, so all physics collisions occur before you're even able to test for a sprite collision. So for all intents and purposes, your sprites will never collide. It's a problem that's been brought up before by a few people.

To get around it, you could make your bricks non-physics objects and code your own collision routine that manually sets your ball's bounce angle and speed. It would take some work, but it could be done. Or you could wait until there's a fix for the physics collision problem. Sucks, I know, but hey... Construct is still just in beta right now so there are limitations.