I’ve created a box like this: https://youtu.be/cPVaDndT7tY?t=20m2s
I want to replicate the movement of physics object, I’m storing all moves performed by local player into an array, as is done for CharacterMovementComponent.
(To create this movement component I’ve taken as example the character movement component)
When I need to adjust the location of local player with character location on the server, I’m not able to reproduce back all the moves stored locally because i’ve not the control over the physics, that is executed automatically each tick…
each tick I’m using this code to move the box:
// Acceleration
FVector MovementForce = BoxOrientationVector * EngineForce * Throttle;
// Drag friction
MovementForce -= VelocityVector.GetSafeNormal() * DragFrictionConstant * VelocitySize * VelocitySize;
BoxComponent->AddForce(MovementForce);
How can I reproduce the moves back as is done in the character movement componet to adjust the location?