| Los ejemplos presentados en este documento y el plugin se han creado en Unreal Engine 4.14, 4.15, 4.18 y 4.20+. Puede que no funcionen correctamente con versiones diferentes de Unreal Engine. |
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "ForceSeatMI" });
| El plugin ForceSeatMI utiliza una DLL que se instala como parte del software ForceSeatPM. Asegúrate de tener ForceSeatPM instalado en tu ordenador. |
IForceSeatMI_API* m_api;
m_api(&IForceSeatMI::Get().GetAPI())
m_api->BeginMotionControl();
m_api->SendTopTablePosLog(...); m_api->SendTopTablePosPhy(...); m_api->SendTopTableMatrixPhy(...);
m_api->EndMotionControl();

ATableLogPos_UnrealPawn::ATableLogPos_UnrealPawn() : CurrentDrawingHeave(0) , CurrentDrawingPitch(0) , CurrentDrawingRoll(0) { // ... código generado por UE4 eliminado para mayor claridad // ForceSeatMI - INICIO memset(&PlatformPosition, 0, sizeof(PlatformPosition)); PlatformPosition.structSize = sizeof(PlatformPosition); // El programa de demostración puede proporcionar pausa, posición y límite de velocidad PlatformPosition.maxSpeed = PLATFORM_MAX_SPEED; PlatformPosition.mask = FSMI_POS_BIT_STATE | FSMI_POS_BIT_POSITION | FSMI_POS_BIT_MAX_SPEED; // ForceSeatMI - FIN } void ATableLogPos_UnrealPawn::Tick(float DeltaTime) { Super::Tick(DeltaTime); // ... código generado por UE4 eliminado para mayor claridad // ForceSeatMI - INICIO SendCoordinatesToPlatform(); // ForceSeatMI - FIN } void ATableLogPos_UnrealPawn::BeginPlay() { Super::BeginPlay(); // ForceSeatMI - INICIO if (FSMI_True == IForceSeatMI::Get().GetAPI().BeginMotionControl()) { SendCoordinatesToPlatform(); } // ForceSeatMI - FIN // ... código generado por UE4 eliminado para mayor claridad } void ATableLogPos_UnrealPawn::EndPlay(const EEndPlayReason::Type EndPlayReason) { Super::EndPlay(EndPlayReason); // ForceSeatMI - INICIO IForceSeatMI::Get().GetAPI().EndMotionControl(); // ForceSeatMI - FIN } void ATableLogPos_UnrealPawn::SendCoordinatesToPlatform() { // ForceSeatMI - INICIO PlatformPosition.state = FSMI_STATE_NO_PAUSE; PlatformPosition.roll = static_cast(FMath::Clamp(CurrentDrawingRoll / DRAWING_ROLL_MAX * PLATFORM_POSITION_LOGIC_MAX, PLATFORM_POSITION_LOGIC_MIN, PLATFORM_POSITION_LOGIC_MAX)); PlatformPosition.pitch = static_cast(FMath::Clamp(CurrentDrawingPitch / DRAWING_PITCH_MAX * PLATFORM_POSITION_LOGIC_MAX, PLATFORM_POSITION_LOGIC_MIN, PLATFORM_POSITION_LOGIC_MAX)); PlatformPosition.heave = static_cast(FMath::Clamp(CurrentDrawingHeave / DRAWING_HEAVE_MAX * PLATFORM_POSITION_LOGIC_MAX, PLATFORM_POSITION_LOGIC_MIN, PLATFORM_POSITION_LOGIC_MAX)); IForceSeatMI::Get().GetAPI().SendTopTablePosLog(&PlatformPosition); // ForceSeatMI - FIN }
IForceSeatMI_VehicleTelemetry* m_veh;
m_veh(&IForceSeatMI::Get().GetVehicleTelemetry())
m_veh->Begin();();
m_veh->Tick(...);
m_veh->End();

void ATelemetry_Veh_UnrealPawn::Tick(float Delta) { Super::Tick(Delta); // ... código generado por UE4 eliminado para mayor claridad // ForceSeatMI - INICIO IForceSeatMI::Get().GetVehicleTelemetry().Tick(*this, *GetVehicleMovement(), Delta, false/* sin pausa */); // ForceSeatMI - FIN } void ATelemetry_Veh_UnrealPawn::BeginPlay() { Super::BeginPlay(); // ForceSeatMI - INICIO IForceSeatMI::Get().GetVehicleTelemetry().Begin(); // ForceSeatMI - FIN }
IForceSeatMI_PlaneTelemetry* m_fly;
m_fly(&IForceSeatMI::Get().GetPlaneTelemetry())
m_fly->Begin();();
m_fly->Tick(...);
m_fly->End();

void ATelemetry_Fly_UnrealPawn::Tick(float DeltaSeconds) { // ... código generado por UE4 eliminado para mayor claridad / Llama a cualquier implementación de Tick de la clase padre Super::Tick(DeltaSeconds); // ForceSeatMI - INICIO IForceSeatMI::Get().GetPlaneTelemetry().Tick(*this, DeltaSeconds, false/* sin pausa */); // ForceSeatMI - FIN } void ATelemetry_Fly_UnrealPawn::BeginPlay() { Super::BeginPlay(); // ForceSeatMI - INICIO IForceSeatMI::Get().GetPlaneTelemetry().Begin(); // ForceSeatMI - FIN }
