[译文] Unity - Mecanim Transition's HasExitTime 会改变Transition的时机

References

原文

原文部分引用

Conditions

A transition can have a single condition, multiple conditions, or no conditions at all. If your transition has no conditions, the Unity Editor only considers the Exit Time, and the transition occurs when the exit time is reached. If your transition has one or more conditions, the conditions must all be met before the transition is triggered.

A condition consists of:
  • An event parameter, the value of which is considered in the condition.
  • A conditional predicate, if needed (for example, less or greater for floats).
  • A parameter value, if needed.

If Has Exit Time is enabled for the transition and has one or more conditions, these conditions are only checked after the exit time of the state. This allows you to ensure that your transition only occurs during a certain portion of the animation.

译文

条件(Conditions)

一个转换可以有一个条件、多个条件,或者根本没有条件。如果您的转换没有任何条件,那么Unity编辑器只考虑退出时间(Exit Time,英文中没说明一点,如果没有Condition的Transition的话,你想要Exit Time是触发,那HasExitTime一定要勾上,不然就没有效果了),当到达退出时间(Exit Time)时就会发生转换。如果转换具有一个或多个条件,则在触发转换之前必须满足所有条件。

条件包括:
  • 参数
  • 判断逻辑
  • 或是判断值,如果需要的话

如果为转换启用了has exit time并且具有一个或多个条件,则仅在状态的退出时间(Exit Time)之后检查这些条件。这允许您确保仅在动画的某个部分发生转换。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值