Collision/fixtures with irregular bodies?
Posted: Sat Jun 25, 2016 11:04 pm
I am familiar with how to collide with regular shapes (like rectangles) but what if I have an object hidden behind an image like this: https://raw.githubusercontent.com/Jello ... eplat1.png
How do I create an object w/ a fixture for that so my other object (representing a player) can collide with it?
I don't think this needs a particular .love, but I'll attach one anyway (BEWARE: Spaghetti code).
In the .love, I made the drawing of the platform image a comment so there's just a circle at the moment.
Also, ignore the fact that the ball is falling and the rectangle is stationary, in this game the platform is supposed to move while the player does her animations in the center and the stage moves around her. This is so the player is always in the center. There is probably a much easier way to do this, but I've already committed to this bad idea. Regardless, this is a thread about the body.
tl;dr irregular bodies for colliding with?
How do I create an object w/ a fixture for that so my other object (representing a player) can collide with it?
I don't think this needs a particular .love, but I'll attach one anyway (BEWARE: Spaghetti code).
In the .love, I made the drawing of the platform image a comment so there's just a circle at the moment.
Also, ignore the fact that the ball is falling and the rectangle is stationary, in this game the platform is supposed to move while the player does her animations in the center and the stage moves around her. This is so the player is always in the center. There is probably a much easier way to do this, but I've already committed to this bad idea. Regardless, this is a thread about the body.
tl;dr irregular bodies for colliding with?