mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +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
|
|
@ -91,6 +91,14 @@ private:
|
|||
IDisplayDevice* mDisplayDevice; ///< Optional client display device that imposes rendering properties.
|
||||
/// @}
|
||||
|
||||
/// @name Client side control scheme that may be referenced by control objects
|
||||
/// @{
|
||||
bool mUpdateControlScheme; ///< Set to notify client or server of control scheme change
|
||||
bool mAbsoluteRotation; ///< Use absolute rotation values from client, likely through ExtendedMove
|
||||
bool mAddYawToAbsRot; ///< Add relative yaw control to the absolute rotation calculation. Only useful with mAbsoluteRotation.
|
||||
bool mAddPitchToAbsRot; ///< Add relative pitch control to the absolute rotation calculation. Only useful with mAbsoluteRotation.
|
||||
/// @}
|
||||
|
||||
public:
|
||||
|
||||
/// @name Protocol Versions
|
||||
|
|
@ -270,6 +278,12 @@ public:
|
|||
const IDisplayDevice* getDisplayDevice() const { return mDisplayDevice; }
|
||||
void setDisplayDevice(IDisplayDevice* display) { mDisplayDevice = display; }
|
||||
void clearDisplayDevice() { mDisplayDevice = NULL; }
|
||||
|
||||
void setControlSchemeParameters(bool absoluteRotation, bool addYawToAbsRot, bool addPitchToAbsRot);
|
||||
bool getControlSchemeAbsoluteRotation() {return mAbsoluteRotation;}
|
||||
bool getControlSchemeAddYawToAbsRot() {return mAddYawToAbsRot;}
|
||||
bool getControlSchemeAddPitchToAbsRot() {return mAddPitchToAbsRot;}
|
||||
|
||||
/// @}
|
||||
|
||||
void detectLag();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue