T3D 1.1 Beta 2 - Overhead camera mode movement issue - RESOLVED
by Rex Hiebert · in Torque 3D Professional · 08/24/2010 (6:46 pm) · 3 replies
Build: 1.1 Beta 2 (but includes back to 1.0.1)
Platform: Windows 7 64 bit
Target: Gameplay, Camera
Issues: When the camera is in "Overhead" mode the forward motion is reversed when your pitch is pointing above the horizon.
Steps to Repeat:
1. Launch deathball
2. Press Alt-C to access the roaming camera
3. Press ~ to bring up the console
4. Type: LocalClientConnection.getCameraObject().controlMode = "Overhead"
5. Fly around, looking at the ground. While moving forward, pan up to look above the horizon line. Your forward/backward movement will be reversed from what it should be.
Platform: Windows 7 64 bit
Target: Gameplay, Camera
Issues: When the camera is in "Overhead" mode the forward motion is reversed when your pitch is pointing above the horizon.
Steps to Repeat:
1. Launch deathball
2. Press Alt-C to access the roaming camera
3. Press ~ to bring up the console
4. Type: LocalClientConnection.getCameraObject().controlMode = "Overhead"
5. Fly around, looking at the ground. While moving forward, pan up to look above the horizon line. Your forward/backward movement will be reversed from what it should be.
#2
change the line
This fixes the reversal but there's still an issue with the camera speed being ignored. I've got a solution that almost works but it still freezes forward motion when your pitch is right at the horizon.
I also tried another method but ran into the problem of determining the heading. Which var holds that? If i can create a matrix with that then I can transform the movement and have something that works. Any ideas?
08/25/2010 (4:47 pm)
in Camera::processTick()else if(virtualMode == OverheadMode)
{
bool faster = move->trigger[0] || move->trigger[1];
F32 scale = mMovementSpeed * (faster + 1);
mObjToWorld.getColumn(3,&pos);
mObjToWorld.getColumn(0,&vec);
vec = vec * move->x * TickSec * scale + (strafeMode ? vec * move->yaw * 2.0f * TickSec * scale : Point3F(0, 0, 0));
vec.z = 0;
vec.normalizeSafe();
posVec = vec;
mObjToWorld.getColumn(2,&vec);
vec = vec * move->y * TickSec * scale - (strafeMode ? vec * move->pitch * 2.0f * TickSec * scale : Point3F(0, 0, 0));
vec.z = 0;
vec.normalizeSafe();
posVec += vec;
posVec.z += move->z * TickSec * scale + move->roll * TickSec * scale;
}change the line
vec = vec * move->y * TickSec * scale - (strafeMode ? vec * move->pitch * 2.0f * TickSec * scale : Point3F(0, 0, 0));to read
vec = vec * ((mRot.x < 0.0) ? -move->y: move->y) - (strafeMode ? vec * move->pitch * 2.0f : Point3F(0, 0, 0));
This fixes the reversal but there's still an issue with the camera speed being ignored. I've got a solution that almost works but it still freezes forward motion when your pitch is right at the horizon.
I also tried another method but ran into the problem of determining the heading. Which var holds that? If i can create a matrix with that then I can transform the movement and have something that works. Any ideas?
#3
09/17/2010 (3:48 pm)
Fixed in 1.1 Beta 3.
Associate David Montgomery-Blake
David MontgomeryBlake