Character Controller (角色控制器) 中 Move()和SimpleMove() 的區別


首先給出兩者的聖典:

 

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM