Hello,
I need some help to determine which method I can use to detect collision between my player and the decor.
The decor is not only composed by rectangles (even if we can always use little ones to make the job but it is so hard to declare them…)
For exemple see the capture bellow.
The player can only move in the red zone.
Finally, the decor can be very more detailed with complexe shape.
I’d like to know if you have some feedback about this problem.
Thank you for your answers !
collision with complexe shapes
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 9
- Joined: Thu Jun 23, 2016 3:07 pm
Re: collision with complexe shapes
If you use Box2D (which is what love.physics is), you can use Edge shapes instead of Rectangles. These are essentially just lines, so you only have to give it two points for each edge in your shape.
You can also use Polygon shapes, but they are limited to at most 8 points, and have to be convex, so it wouldn't really be very useful in your situation.
You can also use Polygon shapes, but they are limited to at most 8 points, and have to be convex, so it wouldn't really be very useful in your situation.
Re: collision with complexe shapes
Ok, I have not look to love.physics yet but I will do it this night !
Thank you.
Thank you.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests