Does Hardware Input is working?

magicfr

Registered
Hello,

I try to code a camera motion.

I managed to trace into my plug, I get UpdateTelemetry called.

I set bool HasHardwareInputs() { return( true ); }

But those 3 functions are never called
void UpdateHardware( const float fDT );
void EnableHardware() { mEnabled = true; } // message from game to enable hardware
void DisableHardware() { mEnabled = false; } // message from game to disable hardware
bool CheckHWControl( const char * const controlName, float &fRetVal );

What did I miss?

Cheers,
Seb
 
I find something, it's was so obvious I didn't see it.
In exemple.hpp void UpdateHardware( const float fDT ); function signature is wrong,
in internalPLugin.hpp it is :
virtual void UpdateHardware( const double fDT ) {}
So I fixed it in exemple.hpp, but the function is called only 1 time... :(

And

void EnableHardware() { mEnabled = true; } // message from game to enable hardware
void DisableHardware() { mEnabled = false; } // message from game to disable hardware
bool CheckHWControl( const char * const controlName, float &fRetVal );

Are stilled not called at all :(
 
Was same bug with bool CheckHWControl( const char * const controlName, float &fRetVal ); wich must be
bool CheckHWControl( const char * const controlName, double &fRetVal );

But there still a bug,
void UpdateHardware( const double fDT ) is called only 20s then nothing.
 
OKeeyyyy

Here the strage behavior I have.

When I go race.

1)void ExampleInternalsPlugin::EnterRealtime() is called.
2)void ExampleInternalsPlugin::UpdateHardware( const double fDT ) is called for 20 seconds
bool ExampleInternalsPlugin::CheckHWControl( const char * const controlName, double &fRetVal ) is NOT called.
3)bool ExampleInternalsPlugin::HasHardwareInputs() is called, I return (true).
from there
4)bool ExampleInternalsPlugin::HasHardwareInputs() is called, I return (true).
void ExampleInternalsPlugin::UpdateHardware( const double fDT ) is NOT called
bool ExampleInternalsPlugin::CheckHWControl( const char * const controlName, double &fRetVal ) is called.

So I got no way to incread time or have a delta time, which make the example not working at all.

Please help.
 
Thanks You :)

Have you been able to figure out your issue ? I'm working on this function as well. I was able to make it call by the game, but not all the variables that they provide are updated and editable. E.g. I know when the player turn the steering wheel or when you look left or right, and I can control that as well.
 
Well, UpdateHardware is still not called :(

So I did a workaround, I update all my internal objects in UpdateTelemetry.
And I "call" command in CheckHWControl

But there still a problem, if the player push look left for example, I don't have the value updated in CheckHWControl.

Also I never managed to make UpdateGraphics works, I wanted to get camera info there.
 
void ExampleInternalsPlugin::UpdateHardware( const double fDT ) is NOT called

anymore news on this issue ?

because it's not really clear to me if
a: I'm doing something wrong here,
b: should use a workaround, and how exactly ?
c: we should wait for another build ..

even if I apply magicfr's fixes both these functions ( CheckHWControl and UpdateHardware) are never called ??

would be nice to get some (official) conformation on this, as I really like to move forward with my plugin

thanx
 
Last edited by a moderator:
Back
Top