Hi all,
I'm working on a project where I want to lock an FPScamera on a single axis (I want no vertical movement). Turning off the vert movement bool in the constructor works to a point, but I've found that the camera can still move vertically via the collision system (for example, walking up a ramp). Is there any way to absolutely lock the camera in the engine so that it will never move along a defined axis?
Locking a camera's movement on one axis
just add something like
to your while (device->run()) loop
MfG
Scarabol
Code: Select all
vector3df target = camera->getPosition();
target.Y = 0;
camera->setPosition(target);
MfG
Scarabol
Irrlicht 1.7.2
Eclipse
Boost
Eclipse
Boost
Well that's what I'm trying now, but the camera ends up getting stuck in the geometry. I think what happens is the camera moves a bit in the Y direction (just one "step" up a ramp, for example), then gets set back down to Y=0, which is inside the geometry.Scarabol wrote:just add something liketo your while (device->run()) loopCode: Select all
vector3df target = camera->getPosition(); target.Y = 0; camera->setPosition(target);
MfG
Scarabol