Callback for "onViewLimit"?
by Timbo · in Torque Game Builder · 09/28/2010 (8:14 am) · 1 replies
Hello everybody.
I need a callback, when the camera hits the view limit. My problem is this:
I have the camera mounted to a "camera dummy" which is used for movement on the playing field. When I set the view limit (via "sceneWindow2D.setViewLimitOn(...)") the camera stops at the view limits, but my camera dummy keeps moving outside. So my idea is to set a callback when the camera actually reaches the limits where I can call setAtRest or something for my camera dummy.
So I looked up the source code and figured out, that the view limit is used in t2dSceneWindow::calculateCameraView. But with a bit of research I found out that the two "if"-cases seem never to be called...
Is it possible to place a callback somewhere in there that tells me, if the camera reached the view limit?
Thanks in advance!
I need a callback, when the camera hits the view limit. My problem is this:
I have the camera mounted to a "camera dummy" which is used for movement on the playing field. When I set the view limit (via "sceneWindow2D.setViewLimitOn(...)") the camera stops at the view limits, but my camera dummy keeps moving outside. So my idea is to set a callback when the camera actually reaches the limits where I can call setAtRest or something for my camera dummy.
So I looked up the source code and figured out, that the view limit is used in t2dSceneWindow::calculateCameraView. But with a bit of research I found out that the two "if"-cases seem never to be called...
Is it possible to place a callback somewhere in there that tells me, if the camera reached the view limit?
Thanks in advance!
About the author
Torque Owner RollerJesus
Dream. Build. Repeat.