工作日誌(反向動力學)【2018.10.15】
阿新 • • 發佈:2018-12-15
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class NewBehaviourScript : MonoBehaviour { //public GameObject F; public Texture T; public MeshRenderer meshRender; Texture tempP; // Use this for initialization void Start() { tempP = Resources.Load<Texture>("hello"); } // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.K)) { //F.GetComponent<SkinnedMeshRenderer>().mateal.mainTexture =T ; meshRender.material.mainTexture = tempP; } } }
實現點選換貼圖的功能,不過洋哥的意思是最終要切換表情時切換法線貼圖 ,對於C#本來就是小白,而且有丟了快一年的我來說,我只能告訴他這個可以有,不過是程式的事啊~洋哥說你不就是程式嗎。。。。好吧,寫寫看,一寫就是三個多小時。。。從找面板顯示的地方怎麼寫,到怎麼獲取面板引數,怎麼呼叫。。。。好吧一系列下來我還是失敗了。。。最後還是找程式來請教了一下。。。完蛋瓦楞。
一直揪心自己是專科。。小靜又說要不要自考本,有點動心,可一個下來也要兩年。。。而且通過率特別低,百分之十,
昨天還解決了一個問題,就是動畫重定向中人的腳會動
這裡有一個腳的控制幀,可以讓腳始終貼地,一個反向動力學的東西,預設是關閉的,開啟就好,好,交工了