Hi , and thank you for that consistent answer .
Just to explore deeper the idea of mouse Hat , the idea suppose the use of a camera .
And i don't know how is done the rendering in the VS engine , but in every 3d rendering system there is an active camera .
So technically , is it possible to dynamically rotate the cam here ?
( i have downloaded the source , i will search myself how to do , but any help is welcome )
edit : okay , i have now the source code , and i've found where is the camera :
Code: Select all
class GameUniverse : public Universe
40 {
41 protected:
43 //unsigned int current_cockpit;
44 //std::vector <Cockpit *> cockpit;
46 Camera hud_camera;
48 void StartGL();
Gameplay in sight , imagine you are pressing the mouse Button 3 , and the mouse now act like in a fps .
When you release the mouse button , the camera is back to front view centered .
We could implement an interpolation for the movement , to smooth that movement .
And hey , from that point , when we have control with the camera , we can also derive new cool features :
_ Head shaking ( when you collide , when you use overdrive , when you are hit , etc ...
_ ... ( what you will imagine )
Edit : Code reference for the cockpit from the source code :
Code: Select all
CockpitKeys Namespace Reference
Functions :
void TextMessageCallback (unsigned int ch, unsigned int mod, bool release, int x, int y)
void TextMessageKey (const KBData &, KBSTATE newState)
void QuitNow ()
void SkipMusicTrack (const KBData &, KBSTATE newState)
void PitchDown (const KBData &, KBSTATE newState)
void PitchUp (const KBData &, KBSTATE newState)
void YawLeft (const KBData &, KBSTATE newState)
void YawRight (const KBData &, KBSTATE newState)
void LookDown (const KBData &kbdata, KBSTATE newState)
void LookUp (const KBData &kbdata, KBSTATE newState)
void LookLeft (const KBData &kbdata, KBSTATE newState)
void LookRight (const KBData &kbdata, KBSTATE newState)
void Quit (const KBData &, KBSTATE newState)
void Inside (const KBData &, KBSTATE newState)
void ZoomOut (const KBData &, KBSTATE newState)
void ScrollUp (const KBData &, KBSTATE newState)
void ScrollDown (const KBData &, KBSTATE newState)
void ZoomIn (const KBData &, KBSTATE newState)
void ZoomReset (const KBData &, KBSTATE newState)
void InsideLeft (const KBData &, KBSTATE newState)
void InsideRight (const KBData &, KBSTATE newState)
void PanTarget (const KBData &, KBSTATE newState)
void ViewTarget (const KBData &, KBSTATE newState)
void OutsideTarget (const KBData &, KBSTATE newState)
void InsideBack (const KBData &, KBSTATE newState)
void CommModeVDU (const KBData &, KBSTATE newState)
void ScanningModeVDU (const KBData &, KBSTATE newState)
void ObjectiveModeVDU (const KBData &, KBSTATE newState)
void TargetModeVDU (const KBData &, KBSTATE newState)
void ViewModeVDU (const KBData &, KBSTATE newState)
void DamageModeVDU (const KBData &, KBSTATE newState)
void ManifestModeVDU (const KBData &, KBSTATE newState)
void GunModeVDU (const KBData &s, KBSTATE newState)
void ReverseGunModeVDU (const KBData &s, KBSTATE newState)
void MissileModeVDU (const KBData &s, KBSTATE newState)
void ReverseMissileModeVDU (const KBData &s, KBSTATE newState)
void SwitchLVDU (const KBData &, KBSTATE newState)
void SwitchRVDU (const KBData &, KBSTATE newState)
void SwitchMVDU (const KBData &, KBSTATE newState)
void SwitchULVDU (const KBData &, KBSTATE newState)
void SwitchURVDU (const KBData &, KBSTATE newState)
void SwitchUMVDU (const KBData &, KBSTATE newState)
void Behind (const KBData &, KBSTATE newState)
void Pan (const KBData &, KBSTATE newState)
And i've found cool stuff about camera here :
Code: Select all
void LookDown( const KBData& kbdata, KBSTATE newState )
361 {
362 if (newState == PRESS && QuitAllow)
363 QuitNow();
364 if (newState == PRESS || newState == DOWN) {
365 if (_Universe->AccessCockpit()->GetView() <= CP_RIGHT) {
366 InitPanInside();
367 } else if (_Universe->AccessCockpit()->GetView() == CP_PANINSIDE) {
368 _Universe->AccessCockpit()->SetInsidePanPitchSpeed(game_options.camera_pan_speed*1000.0);
369 } else {
370 PitchDown( kbdata, newState );
371 }
372 } else if (newState == RELEASE) {
373 if (_Universe->AccessCockpit()->GetView() == CP_PANINSIDE)
374 _Universe->AccessCockpit()->SetInsidePanPitchSpeed(0);
375 else
376 PitchDown( kbdata, newState );
377 }
378 }
So yeah , a lot of functions already exists , i will try to invent new methods for using them .