文档

Unity Engine

Unity Engine

rotationAxis

The axes affected by the AimConstraint.
阅读时间1 分钟最后更新于 1 个月前

Definition

public Axis rotationAxis { get; set; }

Remarks

Use this property to restrict the effect of the constraint on a particular axis.

Examples

using UnityEngine.Animations;public class ConstraintAxis{ public void ConstrainOnlyOnXY(AimConstraint component) { component.rotationAxis = Axis.X | Axis.Y; }}