[fixed in trunk] getCollisonNode() fail in IMetaTriangleSel

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.

Re: Collision bug? getCollisonNode() fail with IMetaTriangle

Postby Strong99 » Sat Jul 06, 2013 11:39 am

Here is a patch which fixes bug1 and 2. But it will still occur for many other collisionmethods
Patch

For example there is still a nested problem with the getCollisionResultPosition. If you look at the stack:
1. getCollisionResultPosition
2. collideEllipsoidWithWorld
3. collideWithWorld

Where 2 uses all the triangles to search for the triangle index returned from 3, which uses a box as filter. I can add the box filter for the getSceneNodeFromTriangle but the collision manager itself would still have the problem.

The filter used in the collisionmanager isn't only the ray or bounding box but it also requires the correct transformation for the box. That transforation is applied after setting the node's transformation in the TriangleSelectors. So to be sure to you get the correct triangle for the given index we should pass the exact same parameters like filter and transformation to the getSceneNodeFromTriangle methods.

Thus we should somehow pass these from 3. collideWithWorld to the 2. collideEllipsoidWithWorld and I'm not sure if thats the correct thing. This could be done through extending the SCollisionData structure with the boundingbox and the used transformation,

@Hybrid, any suggestions?
User avatar
Strong99
Admin
 
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands

Re: Collision bug? getCollisonNode() fail with IMetaTriangle

Postby hybrid » Mon Jul 08, 2013 4:07 pm

I'm not really into this collision system, maybe CuteAlien can help better!?
hybrid
Admin
 
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Re: Collision bug? getCollisonNode() fail with IMetaTriangle

Postby CuteAlien » Mon Jul 08, 2013 9:38 pm

Sorry, that hope's in vain currently.
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8533
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: Collision bug? getCollisonNode() fail with IMetaTriangle

Postby CuteAlien » Tue Dec 06, 2016 4:27 pm

Stuff got rewritten now (svn trunk r5350) and I hope it also fixed all those bugs. Basically in the past the indices of triangles returned got mixed up with indices used inside triangle-selectors - which couldn't work as those are not identical. But this couldn't easily be fixed with old interface, so won't be fixed for Irrlicht 1.8, but only Irrlicht 1.9
On the up-side a new feature got added while fixing this (meshbuffer selection).

edit: Fix had a bug. Fixed again in r5352 and another bug with box selectors in r5353.
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8533
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Previous

Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest