I've been digging into UFloatingPawnMovement and experimenting with replacing my current spaceship code that moves the APawns around using AddActorLocalOffset and AddActorLocalRotation.
The things that motivated me to add a movement component:
However, it seems to me that the only movement input function is
I could just as easily implement that for the APawn or just use
Also, it looks like I will still need to rotate the mesh (e.g roll, pitch, etc.) to turn my spaceships using AddActorLocalRotation, since I can't see any way to turn the mesh using the component.
Am I missing something, or is the above correct, and will UFloatingPawnMovement make movement replication of pawns any easier, i.e. can I simply set the component to Replicated and that is all or do I need to implement server/client handling for velocity, position, rotation, etc.?
Thanks.
The things that motivated me to add a movement component:
- Separate all movement related handling to its own component.
- Make it easier to achieve multiplayer replicata (similar to UCharacterMovementComponent)
However, it seems to me that the only movement input function is
Code:
APawn::AddMovementInput(FVector WorldDirection, float ScaleValue = 1.0f, bool bForce = false)
Code:
AActor::AddActorLocalOffset(FVector DeltaLocation, bool bSweep)
Am I missing something, or is the above correct, and will UFloatingPawnMovement make movement replication of pawns any easier, i.e. can I simply set the component to Replicated and that is all or do I need to implement server/client handling for velocity, position, rotation, etc.?
Thanks.
Comment