collision

yan007

23-04-2006 23:16:18

everything works except for one problem, my collision object isnt big enough, it stops at a certain point

walaber

24-04-2006 02:45:23

hmm... do you have optimization turned on for the TreeCollision?

yan007

24-04-2006 15:39:06

optimization is false,
but for a strange reasen today its fine, and i didnt change anything ..

is it important to set optimization true ??

walaber

24-04-2006 21:01:57

no, I have had mor luck with false...

misterface

25-04-2006 10:52:34

having the same problem since I updated Ogre/OgreNew/Newton
TreeCol doesn't work anymore!! :(:(

newton: 1.52
ogre: 1.2.0RC2 SDK for Visual C++ .Net 2005 (8.0)
ogrenew: http://walaber.com/misc/OgreNewt.rar

abhinavxrai

25-04-2006 12:46:54

That is really weird. I had the same problem and I just turned optimizations false. It worked for me. Maybe try increasing your World Size.

yan007

25-04-2006 13:08:14

now the problem is there again, and i didnt change optimization (false) and the world size

sometimes it works sometimes it doesnt very strange, can someone give an explanation ???

misterface

25-04-2006 13:15:24

world size is not the cause of the problem!

walaber

25-04-2006 17:13:46

This weekend I will update my Ogre copy to RC12 and perform some tests to make sure everything at least works on my end.

misterface

25-04-2006 17:25:08

thx walaber :)

If you need a level where treecol works on the old version but not on the new version:

http://www.dwimmo.be/level11.rar = 1 mesh + materials

misterface

28-04-2006 17:58:58

did anybody find what the problem is?
heeeeelp :? :cry:

misterface

01-05-2006 16:46:56

again the same problem...

walaber

01-05-2006 17:44:17

please hold on for a bit, I have finally got the debugger working under Dagon, so I will be removing all of the Line3D stuff from OgreNewt in the next few days... that way we can eliminate any trouble related to the debugger...

misterface

01-05-2006 20:00:14

I found the cause, very strange!

in createscene() I load my mesh, I do treecol... :
The code


if (levID==9) {
beginPositieRolstoel = Ogre::Vector3(99.5*schaalfactor,300*schaalfactor,43*schaalfactor);
beginOrientatieRolstoel = beginOrientatieRolstoel*Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::UNIT_Y);

Entity* level9Entity = mSceneMgr->createEntity("Level9", "level9.mesh");
SceneNode* level9SceneNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("Level9");
level9SceneNode->attachObject(level9Entity);

OgreNewt::Collision* level9Col = new OgreNewt::CollisionPrimitives::TreeCollision(m_World, level9SceneNode, optimalisatieTreeCollision);
OgreNewt::Body* level9Body = new OgreNewt::Body(m_World, level9Col);
delete level9Col;
level9Body->attachToNode(level9SceneNode);

//voor wrijving & botsingen
level9Body->setMaterialGroupID(matIDLevel);
}


but if I change the if statement with a method: f.e. loadLevel() - with the same code as above in it - and put loadLevel() in creatscene the collision problem occurs (only part of the mesh gets treecoll instead of the whole level) very very strange

so now I changed all the methods with if() {...}
not very nice coding but it works

the next problem is: well see my next post ;)