18-03-2024, 07:37 AM
(This post was last modified: 18-03-2024, 07:37 AM by josemendez.)
(13-03-2024, 02:42 PM)Alnik Wrote: If you now move the cabin, the spreader also moves with it, as the SpreaderAttachment, just like the VCam, is attached to the cabin. If the first client now disconnects from the crane, the ObiSolver is disabled again. If the second client then connects to the crane, the VCam is packed to the position left by the first client, but the ropes spawn at the original position in the centre of the crane, i.e. as if the cabin movement had not taken place before.
What confuses me now is that in the SceneView (also in the video) you can see that the object on which the ropes are actually hanging is in the correct position, but for some reason the ropes themselves are hanging down vertically from the centre.
Hi!
If I understood your description of the issue correctly, the problem is that you're assuming that moving a rope via attachments will modify the rope's transform, but that's not the case. Moving any particle-based actor will only move its particles, the transform remains at the position/rotation where the asset was instantiated. This is because transforms only work for rigid objects: you can't uniquely determine the pos/rot/scale of an object using a single affine matrix if the object is allowed to deform/bend/stretch.
So once you move the crane, disable the client and connect a second client, the rope will respawn where its transform is: where it was before the crane was moved, since moving the crane does not modify the rope's transform.
The solution to this is to sync the rope's start/end positions over the network, or recalculate the position of the transform yourself.
kind regards,