Boxed Collisions

For questions about using Classic.

Post » Wed Dec 05, 2007 2:09 am

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.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Wed Dec 05, 2007 2:20 am

[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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Dec 05, 2007 4:30 am

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
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Wed Dec 05, 2007 4:43 am

[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
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Wed Dec 05, 2007 5:46 am

Edit my post. But yeah, any help would be grateful.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Wed Dec 05, 2007 6:59 am

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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Dec 05, 2007 1:18 pm

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...
B
2
S
1
G
5
Posts: 50
Reputation: 1,500

Post » Wed Dec 05, 2007 2:29 pm

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.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Wed Dec 05, 2007 6:40 pm

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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests