I'm making a game in Love 0.8.0, but I've hit a bit of a bump.
It seems that the way that callbacks work in 0.8.0 is different than 0.7. I've managed with just the source code for quite a few things, but I'm wondering if I could get an explanation of the differences/how it works in 0.8.0.
Thank you for reading my request for help, please answer if you can and have a nice day.
0.8.0 World:setCallbacks help
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: 0.8.0 World:setCallbacks help
0.8.x comes with a complete rework on the physics. I dind't know about the callbacks specifically, but a lot of stuff will change.
When I write def I mean function.
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: 0.8.0 World:setCallbacks help
The callbacks are explained here: http://www.box2d.org/manual.html
The only major difference between the LÖVE 0.8.0 API and the official box2d API is that there are no manifolds in the LÖVE one.
The only major difference between the LÖVE 0.8.0 API and the official box2d API is that there are no manifolds in the LÖVE one.
Re: 0.8.0 World:setCallbacks help
I would request some help or some orientation on this. I'm doing stuff in 0.7.2 and I don't know the general modifications in 0.8 that will make my code break compatibility. There is a list of 0.8 modifications that warns what it's need to make our old code works in 0.8 ?ZenX2 wrote: but I'm wondering if I could get an explanation of the differences/how it works in 0.8.0.
Re: 0.8.0 World:setCallbacks help
One of the most major difference between the physics in 0.7 and 0.8 is fixtures.
I tried a bit harder to figure out where love was handling the callbacks and pushing them back to the lua state, and with some debugging I found the arguments:
1. Fixture A
2. Fixture B
3. The Contact
4. normalImpulses
5. tangentImpulses
Definitely better that passing the userdata.
Also, there's an incorrect comment on line 68 of src/modules/physics/box2d/World.cpp; it still talks about pushing userdata, instead of fixtures.
I tried a bit harder to figure out where love was handling the callbacks and pushing them back to the lua state, and with some debugging I found the arguments:
1. Fixture A
2. Fixture B
3. The Contact
4. normalImpulses
5. tangentImpulses
Definitely better that passing the userdata.
Also, there's an incorrect comment on line 68 of src/modules/physics/box2d/World.cpp; it still talks about pushing userdata, instead of fixtures.
Who is online
Users browsing this forum: Amazon [Bot], Semrush [Bot] and 11 guests