I found the main critical problem.
Functions in http://www.love2d.org/wiki/World:setCallbacks works only in one thread and they cant pass to another.
Same for http://www.love2d.org/wiki/Fixture:setUserData and http://www.love2d.org/wiki/Body:setUserData if userData is table or function (pointer).
Update physics World in another Thread
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- AntonioModer
- Party member
- Posts: 202
- Joined: Fri Jun 15, 2012 5:31 pm
- Location: Belarus
- Contact:
Re: Update physics World in another Thread
Well yeah - LÖVE threads are not real threads, because Lua doesn't support threads. They sort of are threads, but you need to keep in mind that they're implemented via separate Lua states running in separate threads. You can't pass a table (or anything really) from one Lua state to another, you can only do a full duplicate (so it won't be the same object, just a snapshot clone of it), which isn't even always possible.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot], Google [Bot] and 5 guests