controlling head rotation with absolute mouse coords - vs relative delta values
by Zachary Seldess · in Torque Game Engine · 05/13/2009 (6:53 pm) · 0 replies
Hi everyone,
I am a media artist and I'm using TGE and TGEA to design a multi-channel audio video interactive sound world in an upcoming residency at ZKM (Zentrum für Kunst und Medientechnologie) in Germany.
For the project, avatar body movement is controlled via live video tracking of the player in the room, and all is working very well.
But for head/body orientation and rotation I'm using a wireless compass sensors inside a miniature head-like casing, and this is where my problems lie.
Here's my problem. It seems that there is no way to control pitch and yaw of the camera through absolute cursor screen coordinates. The variables passed to pitch and yaw functions (i.e. xaxis, yaxis) in default.bind.cs are the mouse delta values for x and y, and not the current mouse location on the screen.
Is there any way to pass absolute coordinates through TorqueScript to control head rotation in the world space? I understand how to do this type of thing in other 3D programming environments, but for the life of me I can't figure it out here. Maybe it's not possible through script and I need to modify the code? Any help would be greatly appreciated.
best,
Zachary
I am a media artist and I'm using TGE and TGEA to design a multi-channel audio video interactive sound world in an upcoming residency at ZKM (Zentrum für Kunst und Medientechnologie) in Germany.
For the project, avatar body movement is controlled via live video tracking of the player in the room, and all is working very well.
But for head/body orientation and rotation I'm using a wireless compass sensors inside a miniature head-like casing, and this is where my problems lie.
Here's my problem. It seems that there is no way to control pitch and yaw of the camera through absolute cursor screen coordinates. The variables passed to pitch and yaw functions (i.e. xaxis, yaxis) in default.bind.cs are the mouse delta values for x and y, and not the current mouse location on the screen.
Is there any way to pass absolute coordinates through TorqueScript to control head rotation in the world space? I understand how to do this type of thing in other 3D programming environments, but for the life of me I can't figure it out here. Maybe it's not possible through script and I need to modify the code? Any help would be greatly appreciated.
best,
Zachary
About the author