Game Development Community

Help! MouseEvent to PlayerCamera movement

by Richard Dechow · in Torque Game Engine · 09/08/2008 (11:57 am) · 21 replies

Update Title is irrelevant: A proper title would be "Camera Twitching with minor modification to C++", I'd modify the title if I could.

I've been struggling with this for days in TGE.

I'm trying to figure out exactly where in the c++ the pitch and yaw from a mouseEvent get translated to the player camera Pitch/Yaw movement.

I've gotten as far as processTick, but it doesn't appear that the majority of the function even controls actual camera movement when its mounted to a player.

My issue is, I'm Hooking mouse movement into an encoder thats part of a device were using to control the camera. We were originally translating the encoder values to exact transforms (in torque script), but for some odd reason we were getting anywhere from 1/2 to 1 second lag before the game would actually respond to any values the encoder passed. Being that mouse movement seamed to be instantaneous we hooked the encoder to the mouse x, y and what do you know, no more lag.

Now there are 2 issues with the mouse. The fist being Its not absolute, so our view will vary off over time with the same amount of movement from the encoder. the second is, when the FOV is lowered the movement from the camera is also lowered with each MouseEvent. We need the camera movement to be the same no matter the FOV. The reason being is our main game mechanic is Virtual Reality so we need game movement to correspond with real world movement.


Recap:
1. Where in the C++ is Player camera Pitch/Yaw movement controlled? (more specifically by mouseEvent?)
2. How do I remove the FOV from the camera movement equation? (e.g. Locking the FOV to 90 in the movement Equation, but still allow viewport FOV to be changed.)
Page«First 1 2 Next»
#21
09/10/2008 (9:37 am)
Glad we found a solution. I'm always happy to help.
Page«First 1 2 Next»