mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Add basic support for showing openvr controllers and tracked objects
This commit is contained in:
parent
1198932e87
commit
e6159a590a
12 changed files with 1903 additions and 45 deletions
|
|
@ -1999,17 +1999,14 @@ void ShapeBase::getEyeCameraTransform(IDisplayDevice *displayDevice, U32 eyeId,
|
|||
// NOTE: currently we dont support third-person camera in this mode
|
||||
MatrixF cameraTransform(1);
|
||||
F32 fakePos = 0;
|
||||
//cameraTransform = getRenderTransform(); // use this for controllers TODO
|
||||
getCameraTransform(&fakePos, &cameraTransform);
|
||||
|
||||
QuatF baserot = cameraTransform;
|
||||
QuatF qrot = QuatF(newPose.orientation);
|
||||
//QuatF concatRot;
|
||||
//concatRot.mul(baserot, qrot);
|
||||
qrot.setMatrix(&temp);
|
||||
temp = MatrixF(1);
|
||||
newPose.orientation.setMatrix(&temp);
|
||||
temp.setPosition(newPose.position);
|
||||
|
||||
temp.setPosition(cameraTransform.getPosition() + qrot.mulP(newPose.position, &rotEyePos));
|
||||
|
||||
*outMat = temp;
|
||||
*outMat = cameraTransform * temp;
|
||||
}
|
||||
|
||||
void ShapeBase::getCameraParameters(F32 *min,F32* max,Point3F* off,MatrixF* rot)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue