Physics

For questions about using Classic.

Post » Mon Nov 23, 2009 8:45 am

Hello, I'm having a little trouble with the physics engine. I'm using several copies of a single sprite object for my terrain. I have it set to immovable and the collision mask set to the bounding box. Now this works fine if all of the sprites are the same size. However, the results get wonky if I have terrain sprites of different sizes all over the place. The collision mask will still exist but it wont be anywhere near the sprite.



Using the bounding box works great for the platform movement though. Is this a bug? Should I just make a different sprite for each size of terrain I want?
B
2
G
3
Posts: 16
Reputation: 882

Post » Mon Nov 23, 2009 10:40 am

I have successfully done what you are doing here chap, check you haven't got things on different layers etc
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Mon Nov 23, 2009 12:50 pm

The physics behavior generates its map at the beginning of the layout, so if you change a size of a sprite after that it will still use the original dimensions.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Mon Nov 23, 2009 2:23 pm

Actually I figured out what it was. My hotspot was way off center and that was causing it to do weird stuff. Thanks for trying to help though.
B
2
G
3
Posts: 16
Reputation: 882

Post » Mon Nov 23, 2009 2:31 pm

Heh, yeah we've all done that before, don't feel bad. It's easy to miss when your first starting out.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests