I will try to describe what I think caused the problem, to have a note in case I end up doing the same mistake. I don't expect anyone to verify.
Intended behaviour
Laser geometry is specified by LaserProfie and the currently available profiles use segmented beams (i.e. instead of using one long cylinder, the laser cylindrical segments)
The Laser node stores the laser primitives as its children in the scenegraph
The laser material caches affine transforms to plasma and laser nodes to speed up observations
The material of each laser primitive has to be updated after the Laser node transform changes which is done by assigning a new LaserMaterial to every segment
The reassigning of the LaserMaterials is initiated by the _modified method of Laser node being called as a reaction to transform change by Raysect's notification system
the _modified method calls the _configure_material method which assigns new materials to every laser primitive.
Possible source or problem
The caching of transforms in the material uses transform of the laser primitives
laser primitives are one level lower than the Laser node in the scenegraph (are children of Laser)
when Laser.transform is change, the notification system is triggered and the notification reaches the Laser._modified method earlier than the notification to the laser primitives to change their to_root transforms
The result is the transform caches in the new LaserMaterial instances use the deprecated transforms, because the laser primitives were not yet updated.
I hope the explanation is understandable. This can be fixed by dropping and recreating the laser primitives and materials instead of just recreating the materials.
The caches of affine transforms in the material of laser segments are not updated properly after change of laser transform.
I will try to describe what I think caused the problem, to have a note in case I end up doing the same mistake. I don't expect anyone to verify.
Intended behaviour
Possible source or problem
I hope the explanation is understandable. This can be fixed by dropping and recreating the laser primitives and materials instead of just recreating the materials.
I will upload a fix soon.