CuteAlien wrote:Must admit I never used the setViewMatrixAffector. Maybe let's figure out first if it removes stuff because of culling. Can you for a test disable culling for your scenenode completely? You can do so with node->setAutomaticCulling(0).
nope, it's not culling
well, I missed some important thing.
It was something like this:
Code: Select all
irr::scene::ISceneNodeAnimatorCollisionResponse* collider = smgr->createCollisionResponseAnimator(
selector, player->cam, irr::core::vector3df(25,50,25),
irr::core::vector3df(0, -10.f,0),
irr::core::vector3df(0,0,0), 0.005f);
driver->beginScene(true, true, irr::video::SColor(255, 0, 0, 0));
viewMatrix.makeIdentity();
viewMatrix.setTranslation(irr::core::vector3df(0, -25 + PLAYER_HEAD_TILT * sin(moving), 0));
cam->setViewMatrixAffector(viewMatrix);
smgr->drawAll();
driver->endScene();
So the problem appears. After I changed it to:
Code: Select all
irr::scene::ISceneNodeAnimatorCollisionResponse* collider = smgr->createCollisionResponseAnimator(
selector, player->cam, irr::core::vector3df(25,50,25),
irr::core::vector3df(0, -10.f,0),
irr::core::vector3df(0,25,0), 0.005f);
viewMatrix.setTranslation(irr::core::vector3df(0, PLAYER_HEAD_TILT * sin(moving), 0));
And after that it becomes correct. (PLAYER_HEAD_TILT = 3.0f, so it's almost slight)