Download

Networked DetachFromActor resets AActor position

Hello! I’ve encoutered a strange behavior when detaching an Actor from another when both are replicated.

I reproduced this behavior in an empty 3rd person project doing the following:

Linetrace from the camera to screen center and attach the hit object to the character using a server call :

When attaching the object everything works fine, but when I detach it it’s position is reset to Vector(0, 0, 0) on client only. Weird thing is that if I move my (client) character ON the object, the character is teleported to Zero until he leaves the object.

It is worth mentionning that the object is a simple StaticMesh with no physic simulation.

Is this an engine bug? Am I doing something wrong?

I believe you should be multicasting the attach and detach events or else the Client won’t know about it.