Hi everyone
I'm using irrEdit to make my scene files, and loading the scene dynamically.
I'm trying to add a ISceneNodeAnimatorCollisionResponse to the terrain (following the terrain tutorial on this site).
the problem is that I have to grab the terrain node through smgr->getSceneNodeFromName(), which returns an ISceneNode instead of a terrain scene node. Is there a way to grab the terrain as a terrain node instead of a generic node, or maybe cast it as a terrain node somehow?
I could always create the terrain in code rather than use irrEdit, but this seems like such a silly problem that should have a solution..
thanks
terrain collision with irredit
I think you need simply a cast. Try this.
Code: Select all
ITerrainSceneNode *terrain = (ITerrainSceneNode*) smgr->getSceneNodeFromName("terrainname");
one more question..
what's the best way of getting the triangle that is currently colliding? I guess I will need to draw a line, and use the triangle selector?
here's a shot of what I'm working on:
there will be a hardware component, where I take the inclination of the virtual bike and use a stepper motor to match it using a bike trainer. This way we can simulate road texture like gravel, hills, mud, and speed bumps while riding in a virtual environment.
any tips on improving the terrain? It looks great from afar, but it's still a bit rough up close.
what's the best way of getting the triangle that is currently colliding? I guess I will need to draw a line, and use the triangle selector?
here's a shot of what I'm working on:
there will be a hardware component, where I take the inclination of the virtual bike and use a stepper motor to match it using a bike trainer. This way we can simulate road texture like gravel, hills, mud, and speed bumps while riding in a virtual environment.
any tips on improving the terrain? It looks great from afar, but it's still a bit rough up close.