Can't mount my second camera (t2dSceneWindow) [closed]
by Max Kielland · in Torque Game Builder · 01/26/2013 (1:08 pm) · 0 replies
Cant mount my second t2dSceneWindow object.
I have 2 t2dSceneWindow objects in my gui; the main sceneWindow2D and my second, much smaller window mini_sceneWindow2D. In my level I have an empty t2dSceneObject, CameraTarget, to mount my cameras on.
If I only mount my SceneWindow2D, the camera follows the object nicely.
If I only mount the mini_sceneWindow2D, it moves the camera to the mount point but will not follow the object. Even if getIsCameraMounted() returns true.
If I mount both the cameras, non of them will follow the object.
I have a third camera as well, not mounted but moves into a tile position (follows the mouse) without any problems. All the cameras have the default gui profiles.
[EDIT]
I found out that the old guiChunkedBitmapCtrl can clip a bitmap. I needed this to create a health bar and tried the t2dSceneWindow approach (hence the camera problem). With the guiChunkedBitmapCtrl I only needed to change the Extent to make it shrink/grow.
I have 2 t2dSceneWindow objects in my gui; the main sceneWindow2D and my second, much smaller window mini_sceneWindow2D. In my level I have an empty t2dSceneObject, CameraTarget, to mount my cameras on.
If I only mount my SceneWindow2D, the camera follows the object nicely.
CameraLink.Position = "0 0"; sceneWindow2D.mount(CameraLink);
If I only mount the mini_sceneWindow2D, it moves the camera to the mount point but will not follow the object. Even if getIsCameraMounted() returns true.
CameraLink.Position = "0 0"; mini_sceneWindow2D.mount(CameraLink);
If I mount both the cameras, non of them will follow the object.
CameraLink.Position = "0 0"; mini_sceneWindow2D.mount(CameraLink); sceneWindow2D.mount(CameraLink);
I have a third camera as well, not mounted but moves into a tile position (follows the mouse) without any problems. All the cameras have the default gui profiles.
[EDIT]
I found out that the old guiChunkedBitmapCtrl can clip a bitmap. I needed this to create a health bar and tried the t2dSceneWindow approach (hence the camera problem). With the guiChunkedBitmapCtrl I only needed to change the Extent to make it shrink/grow.
About the author
Owner of MK Development www.mkdevelopment.se