Collision detection with cubescenenode

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
VinZ
Posts: 21
Joined: Sat Jul 29, 2006 11:16 am
Location: India

Collision detection with cubescenenode

Post by VinZ »

Hi,
I'm new to irrlicht.net, currently i'm working in collision detection between maya camera node and cubescenenode. i tried a lot, but it is not working,
my code is,

ICameraSceneNode cam =
device.SceneManager.AddCameraSceneNodeMaya(null,5000.0f, 5000.0f, 150.0f,-1);

device.SceneManager.ActiveCamera = cam;

cam.Position = new Vector3D(10,50,-80);
cam.Rotation = new Vector3D(0.0f, 0.0f, 0.0f);

ISceneNode node = device.SceneManager.AddCubeSceneNode(100,
null, -1, new Vector3D(0,-50,0));

node.SetMaterialTexture(0, texWall);
node.SetMaterialFlag(MaterialFlag.LIGHTING, false);


ITriangleSelector selector = null;

selector = device.SceneManager.CreateTriangleSelectorFromBoundingBox(node);
//node.SetTriangleSelector(selector);

ISceneNodeAnimator anim = device.SceneManager.CreateCollisionResponseAnimator(
selector, cam, new Vector3D(30,50,30),
new Vector3D(0,-3,0),
new Vector3D(0,50,0),10.0f);
cam.AddAnimator(anim);


any one can pls help me and solve the problem,
thanks in advance.
Locked