mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Game cam and eye banking, control schemes
- ShapeBaseData has two new properties. cameraCanBank indicates that the game object may bank its eye/camera, if supported by the object. mountedImagesBank indicates that mounted images should bank with the eye/camera in first person view. Both default to false. - Player supports 1st person eye and 3rd person camera banking when making use of the new ExtendedMove class. - Camera class supports banking when making use of the new ExtendedMove class. - GameConnection now has an idea of a control scheme. This determines how game objects should respond to input events. A control scheme may be set by either the server or client. Current control schemes are: -- Absolute rotation (likely though the ExtendedMove class) -- Add relative yaw (from mouse or gamepad) to absolute rotation. -- Add relative pitch (from mouse or gamepad) to absolute rotation. - Player class supports the new control schemes when using the ExtendedMove class. - Camera class supports the new control scheme when using the ExtendedMove class.
This commit is contained in:
parent
2805ec81c8
commit
660250cccf
10 changed files with 570 additions and 127 deletions
|
|
@ -1861,7 +1861,7 @@ void ShapeBase::getImageTransform(U32 imageSlot,MatrixF* mat)
|
|||
// We need to animate, even on the server, to make sure the nodes are in the correct location.
|
||||
image.shapeInstance[shapeIndex]->animate();
|
||||
|
||||
getEyeBaseTransform(&nmat);
|
||||
getEyeBaseTransform(&nmat, mDataBlock->mountedImagesBank);
|
||||
|
||||
MatrixF mountTransform = image.shapeInstance[shapeIndex]->mNodeTransforms[data.eyeMountNode[shapeIndex]];
|
||||
|
||||
|
|
@ -1900,7 +1900,7 @@ void ShapeBase::getImageTransform(U32 imageSlot,S32 node,MatrixF* mat)
|
|||
image.shapeInstance[shapeIndex]->animate();
|
||||
|
||||
MatrixF emat;
|
||||
getEyeBaseTransform(&emat);
|
||||
getEyeBaseTransform(&emat, mDataBlock->mountedImagesBank);
|
||||
|
||||
MatrixF mountTransform = image.shapeInstance[shapeIndex]->mNodeTransforms[data.eyeMountNode[shapeIndex]];
|
||||
mountTransform.affineInverse();
|
||||
|
|
@ -1985,7 +1985,7 @@ void ShapeBase::getRenderImageTransform( U32 imageSlot, MatrixF* mat, bool noEye
|
|||
|
||||
MatrixF nmat;
|
||||
if ( data.useEyeNode && isFirstPerson() && data.eyeMountNode[shapeIndex] != -1 ) {
|
||||
getRenderEyeBaseTransform(&nmat);
|
||||
getRenderEyeBaseTransform(&nmat, mDataBlock->mountedImagesBank);
|
||||
|
||||
MatrixF mountTransform = image.shapeInstance[shapeIndex]->mNodeTransforms[data.eyeMountNode[shapeIndex]];
|
||||
|
||||
|
|
@ -2023,7 +2023,7 @@ void ShapeBase::getRenderImageTransform(U32 imageSlot,S32 node,MatrixF* mat)
|
|||
if ( data.useEyeNode && isFirstPerson() && data.eyeMountNode[shapeIndex] != -1 )
|
||||
{
|
||||
MatrixF emat;
|
||||
getRenderEyeBaseTransform(&emat);
|
||||
getRenderEyeBaseTransform(&emat, mDataBlock->mountedImagesBank);
|
||||
|
||||
MatrixF mountTransform = image.shapeInstance[shapeIndex]->mNodeTransforms[data.eyeMountNode[shapeIndex]];
|
||||
mountTransform.affineInverse();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue