日常總結的知識點(2)

2021-07-25 06:24:30 字數 577 閱讀 6570

1 關於lerp 的理解,所有的lerp就是插值,怎樣理解呢,lerp方法裡面有三個引數,【起點,終點,比例】。

比例的意思就是佔起點和終點之間的百分比,是乙個(0-1)之間的數。

transform.rotation = quaternion.lerp (transform.rotation, qua, time.deltatime * 5f);
2關於quaternion.lookrotation的理解,首先型別是四元數型別,空間中dir面向乙個方向,lookrotation就是面向這個dir的方向。

//讓炮塔一直面向敵人的方向

vector3 dir = other.transform

.position - transform.position

; quaternion qua = quaternion.lookrotation (dir);

transform.rotation = quaternion.lerp (transform.rotation, qua, time.deltatime * 5f);

知識點總結2

當列表增加或刪除元素時列表物件自動進行記憶體的擴充套件或收縮 列表物件常用方法 extend iterable 將可迭代物件iterable中所有元素新增至列表尾部 insert index,x 在列表指定位置index處新增元素x remove x 在列表中刪除首次出現的指定元素 pop inde...

Linux知識點總結2

1.命令 檔案 將檔案作為命令的標準輸入。2.命令 分界符 從標準讀入中輸入,直到遇見分界符。3.命令 檔案a 檔案b 以檔案a作為命令的輸入,並且將結果輸出到檔案b中。4.命令 檔案 將標準輸出定向到檔案中,覆蓋原有檔案內容。5.命令 2 檔案 將錯誤輸出定向到檔案中,覆蓋原有檔案內容。5.命令 ...

日常運維知識點

埠有0 65535個 可分為4類點口 1 專用埠小於1024 tcp ip網路中公共應用 2 使用者埠大於1024 3 註冊埠1024 49151 4 動態或私有埠49152 65535 10.0.0.0 10.255.255.255 172.16.0.0 172.31.255.255 192.16...