MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setCameraSubject

Method setCameraSubject

Engine/source/afx/afxCamera.cpp:309–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309void afxCamera::setCameraSubject(SceneObject* new_subject)
310{
311 // cleanup any existing chase subject
312 if (mCam_subject)
313 {
314 if (dynamic_cast<GameBase*>(mCam_subject))
315 clearProcessAfter();
316 clearNotify(mCam_subject);
317 }
318
319 mCam_subject = new_subject;
320
321 // set associations with new chase subject
322 if (mCam_subject)
323 {
324 if (dynamic_cast<GameBase*>(mCam_subject))
325 processAfter((GameBase*)mCam_subject);
326 deleteNotify(mCam_subject);
327 }
328
329 mMode = (mCam_subject) ? ThirdPersonMode : FlyMode;
330 setMaskBits(SubjectMask);
331}
332
333void afxCamera::setThirdPersonOffset(const Point3F& offset)
334{

Callers 1

DefineEngineMethodFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected