When a ray collides with Terrain, the SceneNode given back by ISceneCollisionManager::getSceneNodeFromRayBB
seems not to return the TerrainSceneNode: its ID is always -1, no matter what value i
assign to the Terrain as its ID.
I printed out the memory address of the SceneNode, which didn't match the
memory address of the Terrain. Even more strange, that address changed when doing
collision testing severall times, even on the very same position.
Also the type of the returned SceneNode is not ESNT_TERRAIN.
[nobug]getSceneNodeFromRayBB and Terrain
-
- Posts: 58
- Joined: Tue Apr 10, 2007 7:49 pm
- Location: Karlsruhe
-
- Posts: 58
- Joined: Tue Apr 10, 2007 7:49 pm
- Location: Karlsruhe
If you provide a simple test case demonstrating this problem it'll speed up the process of getting it fixed.
Thank you
Thank you
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 58
- Joined: Tue Apr 10, 2007 7:49 pm
- Location: Karlsruhe
If I had to guess, I'd say that the camera is being selected. For this to work correctly, you need to set the camera id so that it doesn't match the selection mask. Setting it to zero will do the trick.
You could verify this behavior by displaying the type of the scene node that is actually selected.
Travis
You could verify this behavior by displaying the type of the scene node that is actually selected.
Travis
-
- Posts: 58
- Joined: Tue Apr 10, 2007 7:49 pm
- Location: Karlsruhe
I made a simple test case, that did not reproduce the bug i thought i discovered.
Yesterday, when i stumbled over this problem, i just printed out the type of the returned
SceneNode, which was a funny big number. I suspected it just wasn't initialized.
Today i had a closer look at the type enum and discovered, that these types are indeed
created in a funny way. I did cast the type to u8* and printed it out. (By the way, is there a
better way doing this?)
Well, the returned SceneNode is a Billboard, which actually makes sense. My bad.
Sorry for bothering in the Bug reports forum...
What i still don't get is way this only happends, when i hit the terrain. When i hit another
player (a MeshSceneNode), the returned SceneNode is that player, not the billboard.
Yesterday, when i stumbled over this problem, i just printed out the type of the returned
SceneNode, which was a funny big number. I suspected it just wasn't initialized.
Today i had a closer look at the type enum and discovered, that these types are indeed
created in a funny way. I did cast the type to u8* and printed it out. (By the way, is there a
better way doing this?)
Well, the returned SceneNode is a Billboard, which actually makes sense. My bad.
Sorry for bothering in the Bug reports forum...
What i still don't get is way this only happends, when i hit the terrain. When i hit another
player (a MeshSceneNode), the returned SceneNode is that player, not the billboard.