国产成人亚洲综合色婷婷,漂亮人妻沦陷精油按摩,野花日本高清完整版免费观看视频,狠狠躁夜夜躁人人爽天天,久久av无码精品人妻出轨

  • 您的位置:首頁 > 新聞動態(tài) > Unity3D

    unity3d給物體增加扭矩力

    2019/4/9??????點擊:
    using UnityEngine;
    using System.Collections;
    
    public class AddTorqueExample : MonoBehaviour
    {
        public float amount = 50f;
        
        
        void FixedUpdate ()
        {
            float h = Input.GetAxis("Horizontal") * amount * Time.deltaTime;
            float v = Input.GetAxis("Vertical") * amount * Time.deltaTime;
            
            rigidbody.AddTorque(transform.up * h);
            rigidbody.AddTorque(transform.right * v);
        }
    }