Collision using world geometry

kintaro

27-04-2006 20:52:46

Hi, is there a way to use worldgeometry, I mean a terrain, in TreeCollision of ogrenewt?

OvermindDL1

28-04-2006 03:56:38

Yep, look at the tree collisions class (and the tree serializer).

kintaro

28-04-2006 19:28:23

Hi OvermindDL1, thanks for your aswer, I had take a look on TreeSerializer, but I didn't understand many things. Also, I had look at some similar issues on this forum like:

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=591&highlight=treecollision

and

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=360&highlight=indexdata

But still I don't know exactly what to do. I had been trying to work with:

OgreNewt::Collision* mTerrain_col = new OgreNewt::CollisionPrimitives::TreeCollision(const World *world, int numVertices, Ogre::Vector3* vertices, Ogre::IndexData *indexData, bool optimize)

But I didn't know how to proced with this.

Could you tell me how to do it?

Thanks for help.

OvermindDL1

28-04-2006 23:38:23

I've barely used the TreeCollision class, but it worked fine for me, and the serializer I have not yet touched, nothing has been big enough to need to touch yet, should wait till Walaber comes around.

syedhs

04-05-2006 16:27:37

Yes I have to say that the only thing preventing me from using Ogrenewt is the lack of support for tree collision on terrain created with Heightmap. I remember yesterday of browsing the main Ogre forum , and there is one guy who said that he managed to get the tree collision done on heightmap-based terrain, but it simply stops there. Let me see if I can recall the thread.

OvermindDL1

04-05-2006 17:33:07

As I recall, there is a wiki entry for just that thing, have you not looked at it?

syedhs

06-05-2006 05:44:04

Shoot me, but I still didn't find the wiki which has the solution for the heightmap-based terrain collision. There is an example coming from Newton itself regarding the heighmap.. but it is not Ogre's heightmap - let see if I can understand it :wink:

walaber

06-05-2006 07:23:22

there is definately a wiki entry in there somewhere.

syedhs

06-05-2006 14:57:42

Now the master has spoken, I will have to find it by hook or by crook 8)

[Edit]I think I found it, but it is for PLSM2? I am using TerrainSceneManager.

walaber

06-05-2006 18:28:05

yeah, it was for PLSM2... but since they are similar I think you could adapt it to work on the ogre default terrain scene manager...