การใช้คำสั่งสำหรับการชน
ของวัตถุ
เป็นการใส่ physic ให้กับ วัตถุสำหรับการชนและผลของการใช้คำสั่งกับการเปลี่ยนแปลงเมื่อได้รับการชน
blogger ที่รวมcode python ในรูปแบบการใช้งานและเขียน code บน Pycharmหรือ app Py coding python ง่ายสำหรับคนที่ต้องการศึกษาครับ
การใช้คำสั่งสำหรับการชน
ของวัตถุ
เป็นการใส่ physic ให้กับ วัตถุสำหรับการชนและผลของการใช้คำสั่งกับการเปลี่ยนแปลงเมื่อได้รับการชน
code ทำให้วัตถุเคลื่อนไหว
คัดลอกไปเป็นบางส่วนนะครับดูว่าต้องนำไปใส่ตรงไหนระหว่างcode
public class
PlayMovingScript : MonoBehaviour
{
Rigidbody rb;
// Start is called before the first frame
update
void Start()
{
rb = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
}
private void FixedUpdate()
{
float moveHorizontal =
Input.GetAxis("Horizontal");
float moveVertical =
Input.GetAxis("Vertical");
Vector3 movement = new
Vector3(moveHorizontal, 0.0f, moveVertical);
rb.velocity = movement;
}
}
ใส่ให้ตรงนะครับ
การใช้คำสั่งเกี่ยวกับวันและเวลาด้วยการใช้ Py coding Python ด้วยคำสั่งที่ง่ายสามารถทำตามและนำไปใช้ได้เลย เริ่มเลย from datetime import date...