Hi guys, I’ve been trying to attach my previous pawn to the new one I’m spawning - which works on the clients side but other clients cannot see the process correctly replicated. Clients see other clients stuck under the new pawn (Vehicle) no matter how much I change the TeleportTo location for the old pawn (Driver). I’ve been experimenting with collision, different RPCs and Teleportation but I haven’t got far in replicating the process properly.
The process is as follows:
1- Player hits F key to run a multicast function to turn off collision, set walking mode to none and set gravity scale to 0 and to run a run on server function on the player controller
2- Player controller function spawns new pawn (Car), sets a few variables for animation replication and runs a multicast function which deals with attachment and teleportation of old pawn (Driver) which is a C++ function
which is:
if (PossessingCar)
{
TeleportTo(DriverLocation.GetLocation(), DriverLocation.GetRotation().Rotator(), false, true);
AttachRootComponentToActor(InteractingCar, NAME_None, EAttachLocation::KeepRelativeOffset, true);
}