[unity-16] Character Controller的Move和SimpleMove的区别

来源:互联网 发布:tl wn725n linux 驱动 编辑:程序博客网 时间:2024/05/18 03:18

下面是官方解释以及其翻译大意:


CollisionFlags Move(Vector3 motion);

Description

A more complex move function taking absolute movement deltas.

Attempts to move the controller by motion, the motion will only be constrained by collisions. It will slide along colliders. CollisionFlags is the summary of collisions that occurred during the Move. This function does not apply any gravity.

角色移动只受到碰撞的约束。角色遇到碰撞时将会沿着碰撞盒滑动(你懂得)。返回值是对移动过程中遇到的碰撞信息的汇总。Move函数并不使用重力。


bool SimpleMove(Vector3 speed);

Description

Moves the character with speed.

Velocity along the y-axis is ignored. Speed is in meters/s. Gravity is automatically applied. Returns if the character is grounded. It is recommended that you make only one call to Move or SimpleMove per frame.

Y轴的速度将会被忽略。速度单位是米每秒。重力自动生效。返回值是角色是否着地。建议每帧之调用一次Move或者SimpleMove

0 0
原创粉丝点击