Actually, I downloaded now original IrrNewt 0.4, because my fix introduced other problems (with scales)...white tiger wrote:can you post your fix, a code that show the bug (with different scales) and upload the mesh you are using, please? i can't debug whitout these
Original problem is, that if you create some node in irrlicht, say node A, in some position other than 0,0,0 (preferably far from 0,0,0), then create another node B, and set A to be parent of B, so the position of B is relative to the A, then create newton body for the B using IrrNewt, the newton body for the node B is created on the scene as if the relative position would be absolute (near 0,0,0) and not in the relative position to the parent.
Example:
- create node A on position 1000,1000,1000
- create node B, which is child of A, on position 100,100,100
- create Newton bodies for these nodes
Result:
- good created body for node A
- body for node B is in absolute position 100,100,100 instead of something near 1000,1000,1000 ( (100,100,100) relative to the (1000,1000,1000)).
The problem might be growing if we also scale the size of node B (especially when the scale is not the same as scale of node A), example:
B->setScale(0.4,0.4,0.4);
Do you understand now? I wasn't able to fix this... Could you post, what should I change in IrrNewt 0.4 source code to fix this?