public void Effect(XCameraMotionData motion, bool overrideclip) { //must be called from UPDATE pass AnimationClip clip = XResources.Load <AnimationClip>(motion.Motion3D, AssetType.Anim); if (clip != null) { _trigger = "ToEffect"; if (overrideclip && _overrideController["CameraEffect"] != clip) { _overrideController["CameraEffect"] = clip; } _motion.LookAt_Target = motion.LookAt_Target; _motion.Follow_Position = true; _motion.Coordinate = CameraMotionSpace.World; switch (motion.Motion3DType) { case CameraMotionType.AnchorBased: _motion.AutoSync_At_Begin = true; _motion.LookAt_Target = false; break; case CameraMotionType.CameraBased: _motion.AutoSync_At_Begin = false; break; } _motion.Motion = motion.Motion3D; } }
public void Effect(XCameraMotionData motion, string trigger) { _trigger = trigger; _motion.LookAt_Target = motion.LookAt_Target; _motion.Follow_Position = true; _motion.Coordinate = CameraMotionSpace.World; switch (motion.Motion3DType) { case CameraMotionType.AnchorBased: _motion.AutoSync_At_Begin = true; _motion.LookAt_Target = false; break; case CameraMotionType.CameraBased: _motion.AutoSync_At_Begin = false; break; } _motion.Motion = motion.Motion3D; }
public void Effect(XCameraMotionData motion) { Effect(motion, "ToEffect"); }