Skip to main content

LocalMoveTest

A class in Root.Township, the global namespace.

Test component that moves or spins its object in a loop on the server, to test syncing of moving things.

Constructors​

MemberWhat it is
LocalMoveTest()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

5 private and internal fields
MemberWhat it is
private float magnitudeDistance of the sine movement.
private Vector3 positionStart position.
private Quaternion rotationStart rotation.
private float speedRate of the motion.
private LocalMoveTest.Type typeWhich motion to run: Y rotation, Y movement or X movement.

Methods​

2 private and internal methods
MemberWhat it is
private void FixedUpdate()Server: spins the object around Y, or bobs it on Y or X with a sine wave, from its start pose.
private void Start()Stores the start position and rotation.