ขณะที่เล่น animation ตัวละครจะค่อยๆ เลื่อนขึ้นลงในแนวตั้ง แก้ปัญหาโดยตั้งค่า
Root Transform Position (Y) > Bake into Pose ครับ
http://answers.unity3d.com/questions/429825/mecanim-with-rigidbody-walking-in-mid-air.html
Monday, February 23, 2015
Sunday, February 22, 2015
แกนตั้งของ bone ใน character
พอดีลอง animation ใน unity3d แล้วทุกอย่างใช้ได้ปกติหมด แต่ตอนแรกที่เดินอยู่บนพื้นสักพักเท้าจะค่อยๆ จมลงไปในพื้น ตรวจสอบจาก mesh ดูแล้วมีกล่องที่มีขอบสีขาวไม่ได้อยู่ในระนาบเดียวกับตัวละคร เลยลองหาวิธีแก้ดู ถ้าดูจาก hip แปลว่า สะโพก พอดูจาก bone ที่สร้างใน blender นั้น bone ส่วน hip นี้เอียงอยู่หน่อยเลยตั้งให้ตรงปัญหานี้ก็หมดไปครับ
Saturday, February 21, 2015
การเปลี่ยน animation clip ที่ทำงานด้านซ้ายให้เป็นทำงานด้านขวา
ถ้าเป็น clip ฝั่ง righ ให้ copy clip ไปไฟล์ใหม่ ตั้งชื่อเป็น left และเลือก mirror:1
โดยสามารถเปิดไฟล์ใน explorer เพื่อแก้ไข .meta ให้เป็นค่าใหม่
หรือใน tab inspector ให้ติ้กเลือก checkbox Mirror
http://answers.unity3d.com/questions/390652/mirror-animation-mecanim.html
โดยสามารถเปิดไฟล์ใน explorer เพื่อแก้ไข .meta ให้เป็นค่าใหม่
หรือใน tab inspector ให้ติ้กเลือก checkbox Mirror
http://answers.unity3d.com/questions/390652/mirror-animation-mecanim.html
การควบคุม animation ของ character ด้วย unity3d animator class
Unity3D จะมีการควบคุมการแสดงผล animation โดยการเปลี่ยนแปลง Animation State
และเราจะควบคุม State ผ่านการเปลี่ยนแปลงค่าของ parameter ต่างๆ ที่ระบุใน Mecanim State Machines
http://unity3d.com/learn/tutorials/modules/beginner/animation/animator-scripting
และเราจะควบคุม State ผ่านการเปลี่ยนแปลงค่าของ parameter ต่างๆ ที่ระบุใน Mecanim State Machines
http://unity3d.com/learn/tutorials/modules/beginner/animation/animator-scripting
การนำ mesh มารวมกัน
1. เริ่มต้นด้วยการเลือก edge ที่ต้องการรวมกัน ทั้งสองฝั่ง
2. ใช้คำสั่ง Bridge edge loops
3. จากนั้น Delete Edge Loop เพิ่มให้ขอบหายไป
http://blender.stackexchange.com/questions/15712/merging-two-cube-meshes
2. ใช้คำสั่ง Bridge edge loops
3. จากนั้น Delete Edge Loop เพิ่มให้ขอบหายไป
http://blender.stackexchange.com/questions/15712/merging-two-cube-meshes
ปัญหาการใช้ humanoid animation ใน unity3d
ผมลองทดสอบระบบ humanoid animation กับ character ที่ผมสร้างขึ้นเองโดยโปรแกรม blender
แต่ปรากฎว่า character จมลงไปจนถึงข้อศอกของตัวละคร ลองแก้มาหลายวิธีจนในที่สุดก็ทราบว่า
ลืมตั้งค่า Humanoid Import Setting ของตัว animation เป็น Humanoid ด้วย
สรุปแล้วต้องตั้งค่าทั้งที่ตัว character และที่ตัว animation ด้วยครับ เพื่อกันลืมก็จดโน้ตไว้ที่นี่ครับ :)
ลิงค์ปัญหาที่คล้ายๆ กัน
http://answers.unity3d.com/questions/398465/character-falls-thru-to-his-waist.html
Subscribe to:
Posts (Atom)