Hi Everyone. I've implemented a Debug Drawer using Irrlicht, with a on-screen text debug, but the result seems wrong.
I set the SceneNode's position equal to the position I query from bullet to render.
Screenshot:
Does the btIDebugDraw have some kind of offset?
-
- Posts: 225
- Joined: Wed Jan 07, 2009 11:43 am
- Location: London
Re: Does the btIDebugDraw have some kind of offset?
Nope , there shouldn't be any offset.. Are the collisions happening where you expect them to, or are they offset as well?
-
- Posts: 6
- Joined: Mon Mar 11, 2013 8:15 am
Re: Does the btIDebugDraw have some kind of offset?
Everything else is fine, just the debug drawer makes me wondering. I think I'm not able to use it with Irrlicht anymore.xexuxjy wrote:Nope , there shouldn't be any offset.. Are the collisions happening where you expect them to, or are they offset as well?
-
- Posts: 72
- Joined: Wed Feb 24, 2010 9:49 pm
Re: Does the btIDebugDraw have some kind of offset?
Looking at the doumentation, Irrlicht nodes have positions in local coordinates relative to the parent (root) node.
There is getPosition for local coordinates and getAbsolutePosition to get world coordinates.
Since there is no setAbsolutePosition, you should subtract the position of the root from the position of the node to convert it into local coordinates and then use setPosition.
There is getPosition for local coordinates and getAbsolutePosition to get world coordinates.
Since there is no setAbsolutePosition, you should subtract the position of the root from the position of the node to convert it into local coordinates and then use setPosition.