Problematic behavior in OnEntitySpawned(CargoShip ship)The hook does this:
  • On cargo ship spawn, it captured the ship’s position, but not its actual rotation:
  • Vector3 pos = ship.transform.position;
  • Quaternion rot = new Quaternion(); (identity, not the ship’s real rotation)
  • It then started a very tight repeating timer:
  • timer.Every(0.01f, () => { ship.transform.position = pos; ship.transform.rotation = rot; ... });
  • That loop ran for about 3 seconds, constantly forcing the ship back to the original position and an identity rotation.
  • After 3 seconds, it spawned recyclers and finally destroyed the timer.
Why that breaks cargo ship spawning/direction
  • For the first ~3 seconds, the cargo ship is effectively frozen in place: any movement or rotation that the base game (or other plugins) tries to apply is immediately overwritten every 0.01s.
  • Because rot was initialized as new Quaternion() instead of ship.transform.rotation, the ship is also being forced to an incorrect rotation during that entire period.
  • Any code that relies on the ship’s normal early movement/rotation (e.g., initial pathing or directional spawn behavior) is affected by this forced transform reset.
Safer behavior (maybe)
  • OnEntitySpawned now:
  • Immediately captures the real spawn transform once:
  • Vector3 pos = ship.transform.position;
  • Quaternion rot = ship.transform.rotation;
  • Uses a one-shot delay instead of a 0.01s spam:
  • timer.Once(0.5f, () => { ...spawn recyclers... });
  • In that callback, it uses the stored pos/rot only to compute recycler offsets:
  • SpawnRecycler(ship, GetCargoFrontPosition(pos, rot));
  • SpawnRecycler(ship, GetCargoBackPosition(pos, rot));
  • SpawnRecycler(ship, GetCargoBottomPosition(pos, rot));
  • There is no longer any loop that constantly rewrites the ship’s transform, so the ship can move and rotate normally while recyclers are still placed correctly relative to the initial spawn.
Net effect
  • Recyclers still appear in the same spots on the ship.
  • The cargo ship is no longer pinned or force-rotated for the first 3 seconds after spawn, so its natural spawn behavior and direction are preserved.

    Attempting to do anything custom this plugin will override the angle and position, can you add these changes.
    I already applied my own changes so this doesn't affect my cargoship event any longer.