Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// edit Engine/source/T3D/camera.cpp and past the following
- /// below DefineEngineMethod( Camera, setRotation, void, ( Point3F rot ), ,
- /// around line 1655 in T3D 1.1 Final:
- //-----------------------------------------------------------------------------
- DefineEngineMethod( Camera, getOrbitDistance, F32, (), ,
- "Get the camera's current orbit mode's distance.\n\n"
- "@returns The current orbit mode's distance as a float.")
- {
- return object->getOrbitDistance();
- }
- //-----------------------------------------------------------------------------
- DefineEngineMethod( Camera, setOrbitDistance, void, ( F32 dist ), ,
- "Set the camera's orbit mode's distance.\n\n"
- "@param dist The distance to be set for orbit mode.")
- {
- object->setOrbitDistance( dist );
- }
- /// now edit the associated header file Engine/source/T3D/camera.h and insert
- /// the following code just after void setRotation( const Point3F& viewRot );
- /// around line 152:
- F32 getOrbitDistance() { return mCurOrbitDist; }
- void setOrbitDistance(F32 dist)
- {
- if(dist > mMaxOrbitDist) dist = mMaxOrbitDist;
- if(dist < mMinOrbitDist) dist = mMinOrbitDist;
- mCurOrbitDist = dist;
- };
Add Comment
Please, Sign In to add comment