T3D 1.1 final - Scene is not correctly scoped when camera is in orbit mode - LOGGED (THREED-2118)
by Guy Allard · in Torque 3D Professional · 07/04/2011 (2:18 am) · 3 replies
build:
All T3D versions that contain the new camera class.
Platform:
Vista 32bit.
Target:
In game.
Issues:
If the camera is set to orbit mode and is not the control object, for example if the camera is set to orbit a player, the scene does not get scoped correctly to the client.
Steps to repeat:
1) Set up the game to use an overhead camera:
edit gameCore.cs, at the end of GameCore::onClientEnterGame add
2) Start the game, load a level. Go into the editor, and change the levelInfo visible distance to something small, like 20. Move your player, and watch him disappear when he gets more than 20 units away from where he spawned.
More info:
The reason for this bug is that the camera class does not update the position of the server-side camera unless it is the control object, which is not the case when using the orbit camera as above.
The position of the camera on the server is used for determining which objects are scoped to the client. As the server side camera does not move from its initial position, the scene is always incorrectly scoped from that position.
With the levels shipped with T3D, the large visible distances for the levels mask this problem.
Some of the other camera modes will also be affected by this issue.
All T3D versions that contain the new camera class.
Platform:
Vista 32bit.
Target:
In game.
Issues:
If the camera is set to orbit mode and is not the control object, for example if the camera is set to orbit a player, the scene does not get scoped correctly to the client.
Steps to repeat:
1) Set up the game to use an overhead camera:
edit gameCore.cs, at the end of GameCore::onClientEnterGame add
// GUY >>
// set up the overhead camera
if(isObject(%client.camera) && isObject(%client.player))
{
%client.setCameraObject(%client.camera);
%client.camera.setOrbitObject(%client.player, mDegToRad(90) @ " 0 0",
10, 10, 10,
true,
"0 0 0",
true );
%client.setFirstPerson(0);
}
// GUY <<2) Start the game, load a level. Go into the editor, and change the levelInfo visible distance to something small, like 20. Move your player, and watch him disappear when he gets more than 20 units away from where he spawned.
More info:
The reason for this bug is that the camera class does not update the position of the server-side camera unless it is the control object, which is not the case when using the orbit camera as above.
The position of the camera on the server is used for determining which objects are scoped to the client. As the server side camera does not move from its initial position, the scene is always incorrectly scoped from that position.
With the levels shipped with T3D, the large visible distances for the levels mask this problem.
Some of the other camera modes will also be affected by this issue.
About the author
Recent Threads
#3
EDIT: sorry missed the part about setting visible distance. It does happen even on flat terrain or ground plane.
EDIT 2: Tried the source edit from the link posted by Lunacy and it seems to have remedied the problem. not sure if other issues will appear. Further testing is needed.
09/12/2011 (11:27 am)
looks like it is caused buy the drop in terrain height. I works fine for ground plane or flat terrain. Glad you caught this so I did not run into it later when adding terrains.EDIT: sorry missed the part about setting visible distance. It does happen even on flat terrain or ground plane.
EDIT 2: Tried the source edit from the link posted by Lunacy and it seems to have remedied the problem. not sure if other issues will appear. Further testing is needed.
Torque 3D Owner Christopher Tauscher
Default Studio