But I don't understand how to limit movement area (I only should able to move aroundmap)?
As I understand.
Code: Select all
scene::ITriangleSelector* selector = 0;
selector = scene->createOctreeTriangleSelector(map->getMesh(0), map_node, 128);
map_node->setTriangleSelector(selector);
Code: Select all
scene::ISceneNodeAnimator *collision = scene->createCollisionResponseAnimator(
selector,camera,core::vector3df(20,40,20),
core::vector3df(0,-2,0),
core::vector3df(0,0,0),
0.0f);
camera->addAnimator(collision);