Hello ! I'm new on lua and I need help adding box colission to my objects
EXAMPLE: i have a wall and a character but the character just pass through the wall, How I do the character collide with the wall?
(Sorry for my bad English )
How I make collision affect objects?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
How I make collision affect objects?
Hi! I wish you have an amazing day!
Re: How I make collision affect objects?
There are two ways:
1. Implement it yourself.
2. Use a pre-made library.
Each of these options has several ramifications. The choice depends on your skills, the project that you aim for and, for the first option, the work you want to invest into it.
A simple model that fits typical map-based games, where the collision shapes are only axis-aligned rectangles (that is, rectangles with only horizontal or vertical sides), only requires a function for rectangle intersection and simple coordinate adjustments.
For the second option, if you need more fine-grained collision resolution, but still with axis-aligned rectangles, then I'd suggest you look into bump.lua. If you need more complex shapes, but no sophisticated collision resolution, you can look into HC. And if you want a full physics simulation, Löve includes the love.physics module.
1. Implement it yourself.
2. Use a pre-made library.
Each of these options has several ramifications. The choice depends on your skills, the project that you aim for and, for the first option, the work you want to invest into it.
A simple model that fits typical map-based games, where the collision shapes are only axis-aligned rectangles (that is, rectangles with only horizontal or vertical sides), only requires a function for rectangle intersection and simple coordinate adjustments.
For the second option, if you need more fine-grained collision resolution, but still with axis-aligned rectangles, then I'd suggest you look into bump.lua. If you need more complex shapes, but no sophisticated collision resolution, you can look into HC. And if you want a full physics simulation, Löve includes the love.physics module.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], secretsue92 and 81 guests