6 [AddComponentMenu(
"Liberi/Constant Speed")]
7 [RequireComponent(typeof(Rigidbody))]
8 [Script(ScriptRole.Owner)]
18 void OnSpawn (
UJeli details)
20 if (details.HasChild(
"Velocity"))
21 Speed = details[
"Velocity"].Vector3Value.magnitude;
26 if (rigidbody.isKinematic)
29 rigidbody.velocity = rigidbody.velocity.normalized *
Speed;
Makes this object maintain a constant speed.
float Speed
The speed to maintain.
Unity version of Jeli markup class.