Added code to simplify finding good final positions for the camera
(though it involves setting a breakpoint etc, so it's only for developers). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2932 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
01e99f4abf
commit
d0f713e03d
@ -227,6 +227,23 @@ void Camera::finalCamera(float dt)
|
|||||||
Coord coord(m_xyz, m_hpr);
|
Coord coord(m_xyz, m_hpr);
|
||||||
m_context->setCamera(&coord.toSgCoord());
|
m_context->setCamera(&coord.toSgCoord());
|
||||||
}
|
}
|
||||||
|
#undef TEST_END_CAMERA_POSITION
|
||||||
|
#ifdef TEST_END_CAMERA_POSITION
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// This code is helpful when tweaking the final camera position:
|
||||||
|
// Just set a breakpoint here, change the values for x,y,z,h,p,r,
|
||||||
|
// and then keep on running, and you can see what the final position
|
||||||
|
// looks like. When happy, just put these value as
|
||||||
|
// camera-final-position and camera-final-hpr in the .track file.
|
||||||
|
static float x=5,y=20,z=3,h=180,p=-10,r=0.0f;
|
||||||
|
Vec3 xyz(x,y,z);
|
||||||
|
Vec3 hpr(DEGREE_TO_RAD(h),DEGREE_TO_RAD(p),DEGREE_TO_RAD(r));
|
||||||
|
Coord coord(xyz, hpr);
|
||||||
|
m_context->setCamera(&coord.toSgCoord());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // finalCamera
|
} // finalCamera
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user