MovementComponent->SetVelocity explained

I got confused for a bit why we where sending the velocity to the movement component, when the movement component isn’t simulating moves as a SimulatedProxy.
It’s just where we are storing it, we grab it again in SimulatedProxy_OnRep_ServerState() for using as the start velocity in the cubic lerp. The movement comp doesn’t care about it.

@Maysh i think you’re totally right
It seems that this line (GoKartMovementComponent->SetVelocity(Velocity)) is redundant since it sets the velocity value on the GoKartMovementComponent, but the GoKartMovementComponent is not simulating moves for the SimulatedProxy so there is no meaning of setting this velocity value, And therefore all the logic behind making the Hermite cubic spline for direvatives is also redundant.

@sampattuzzi what does the course stuff think about it?

It’s been a while since I wrote the code! It’s quite possible that I’m just storing the velocity as Maysh says.

Privacy & Terms