What I mean by title is a collision detection library that dosen't require every bounding box of everything in the scene to be defined beforehand. I'd perfer one where you can just call a single function with the coords/width/height/whatever of two shapes and get a bool for whether or not they're colliding.
The reason I want something like this is because I'm using Box2d, which has collision detection, but it only works if objects are moving naturally. I have a sensor that constantly gets teleported to the mouse, and there's no way to tell if things collide with that sensor using Box2d collision events!
Edit: Didn't know MouseJoint existed, the problem's now resolved. Thanks!
Any libs for collision detection that don't work like bump.lua?
Any libs for collision detection that don't work like bump.lua?
Last edited by iimurpyh on Wed Feb 05, 2020 12:36 am, edited 1 time in total.
Re: Any libs for collision detection that don't work like bump.lua?
For things like that you can use queries instead of a body. I use World:queryBoundingBox() and then, if it needs to be accurate, use Fixture:testPoint() on each fixture that I get.
Re: Any libs for collision detection that don't work like bump.lua?
You can try HC.iimurpyh wrote: ↑Tue Feb 04, 2020 1:06 am What I mean by title is a collision detection library that dosen't require every bounding box of everything in the scene to be defined beforehand. I'd perfer one where you can just call a single function with the coords/width/height/whatever of two shapes and get a bool for whether or not they're colliding.
If you set the velocity of the object you teleport right after you do, you might be luckier with that.iimurpyh wrote: ↑Tue Feb 04, 2020 1:06 am The reason I want something like this is because I'm using Box2d, which has collision detection, but it only works if objects are moving naturally. I have a sensor that constantly gets teleported to the mouse, and there's no way to tell if things collide with that sensor using Box2d collision events!
Also, maybe a mousejoint helps?
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 8 guests