I have some problems with the automatic collosion (again) and want to use manual collosion. for example i stick on the roof of a room while jumping, or some problems while crouching. i cound implement only the jumping part myself, but the problem is: i need the bool isFaling() fuction, but it works only if the automatic gravity is != 0.
I want to know: is there any possibility to use some irrlicht-funktions for collotion but not the animator, that does everything for the user? or do i have to create everything manually?
manual collosion (part 2)
no, i think i'll implement it complete myself (hard but interesting job). But you problem is (i think) not as big, because you don't need an ellipsoid-collosion. i think you even don't need an AABB. You can check with
cam=camera->getPosition();
smgr->getCollisionManager()->getCollisionPoint(line3d(vector3df(cam.X,1000,cam.Z),vector3df(cam.X,-1000,cam.Z),sel,tri,point);
on which height the camera shoud be and you can set it with
cam.Y=point.Y;
camera->setPosition(cam);
or didn't i understand your problem?
cam=camera->getPosition();
smgr->getCollisionManager()->getCollisionPoint(line3d(vector3df(cam.X,1000,cam.Z),vector3df(cam.X,-1000,cam.Z),sel,tri,point);
on which height the camera shoud be and you can set it with
cam.Y=point.Y;
camera->setPosition(cam);
or didn't i understand your problem?
I'm not very experienced with this, so when I'm wrong you should correct me.
I would like to make a Snowboard game. The player should be mesh and I want to generate an AABB from it.
The camera is a 3rd person camera, so the player mesh should collide with the terrain. Therefore I need AABB<->Terrain collision.
I would like to make a Snowboard game. The player should be mesh and I want to generate an AABB from it.
The camera is a 3rd person camera, so the player mesh should collide with the terrain. Therefore I need AABB<->Terrain collision.
Regards,
Jeroen
Jeroen
Ok, here's what you do: Create your scene node for your snowboarder. Create your terrain. Create an OctTreeTriangleSelector for your terrain. Create a collision repsonse animator (using smgr->createCollisionResponseAnimator()), giving it the triangle selector for your terrain, and your scene node.
Using this method, your snowboarder will also be affected by gravity. The size of gravity is configurable, or a default can be used.
Using this method, your snowboarder will also be affected by gravity. The size of gravity is configurable, or a default can be used.
I'm going to try this, but then my snowboarder isn't gliding over the terrain. Am I correct here ?
If I want more control over the response, eg. let the snowboarder fall on the ground, should I do my own collision detection/reaction then ?
I also found that in the TriangleSelector there is a method for collision with an AABB.
If I want more control over the response, eg. let the snowboarder fall on the ground, should I do my own collision detection/reaction then ?
I also found that in the TriangleSelector there is a method for collision with an AABB.
Regards,
Jeroen
Jeroen