Homing Projectile Orientation Replication?

Actor owned by the server spawns a homing projectile. The movement and orientation work on the server side, but on the client side the projectile’s rotation is not orienting to its velocity.

The projectile BP is set to replicate, its projectile movement component is set to replicate, and the BP’s class default “replicate movement” is set to true. Projectile “Rotation Follows Velocity” set to true.

The projectile’s movement is replicating becasue it is properly “homing in” on the target, but the mesh is not rotating properly.

I read elsewhere that the projectile’s velocity is not replicated so that would explain why this is not working.

I instead multicast the spawn actor event after spawning on server, set the projectile to NOT replicate, and upon overlap I check for authority prior to logic.

If this is the proper way of handling this please let me know, as of now this is my solution.

  • Firing client (Autonomous proxy) should fire its own local projectile on input.
  • RPC server (Authoritative proxy) to fire its own.
  • Upon firing on the server, multicast and check role (get local role).
  • Simulated Proxy should then spawn its own based on parameters determined by the server.

This gets a localized (non-replicated) on each player screen. Low bandwidth, minimal network congestion. Highly responsive to the shooter.

The server only needs to replicate hit data for decals/fx, applied damage etc.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.