private void ActorUpdate(VoosActor actor) { assetUI.header.text = $"{actor.GetDisplayName()} : Rotate"; UpdateVec3Input(actor.GetRotation().eulerAngles, assetUI.currentInputs); UpdateVec3Input(actor.GetSpawnRotation().eulerAngles, assetUI.spawnInputs); UpdateVec3Input(actor.GetRenderableRotation().eulerAngles, assetUI.offsetInputs); }
public void PushTo(VoosActor actor) { Vector3 rotEuler = actor.GetRenderableRotation().eulerAngles; rotEuler.y = yaw; actor.SetRenderableRotation(Quaternion.Euler(rotEuler.x, rotEuler.y, rotEuler.z)); actor.SetRenderableOffset(offset); // HACK FOR CLONES actor.ApplyPropertiesToClones(); }
void SetActorOffset(VoosActor actor, Vector3 vec) { Quaternion oldRot = actor.GetRenderableRotation(); undoStack.PushUndoForActor( actor, $"Set actor offset", (undoActor) => undoActor.SetRenderableRotation(Quaternion.Euler(vec)), (undoActor) => undoActor.SetRenderableRotation(oldRot) ); }
Vector3 GetActorOffsetRotation(VoosActor actor) { return(actor.GetRenderableRotation().eulerAngles); }