Game Development Community

T3D 1.1 final (and earlier) - SFX listener position does not move when orbit mode camera is used - DUPLICATE (THREED-1928)

by Guy Allard · in Torque 3D Professional · 09/08/2011 (12:28 pm) · 1 replies

build:
All T3D versions that contain the new camera class.

Platform:
Vista 32bit.

Target:
In game.

Issues:
When the camera is set to orbit mode, and is not the control object, the position that is used for the SFXListener is always the initial position of the camera. The listener position does not move with the camera.

This has also been mentioned recently here.

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 that contains a sound emitter. Move around, and you will find that the sound from the emitter does not change.

More Info:
This bug is related to this bug.
In Camera::processTick, when the camera is not the control object, the transform of the camera does not get updated. The renderTransform of the camera is calculated correctly on the client, and subsequently the camera appears to move in the scene despite the fact that its transform never changes. When determining the position of the SFXListener, the transform (not the renderTransform) is used, and so the listener position does not move. This is also responsible for the scoping issues in the above thread.

#1
09/08/2011 (1:39 pm)
@Guy Allard: I'm told this issue is related to THREED-1928 which is in known issues thread.