Sudan. kgm จำกัด rigidbody วามเร็ว

รหัสตัวอย่าง

3
0

sudan. kgm ยังไงตั้ง rigidbody วามเร็ว

Vector3 velocity = new Vector3(10f/*x*/, 10f/*y*/, 10f/*z*/);
GetComponent<Rigidbody>().velocity = velocity;
2
0

unityy จำกัด rigidbody วามเร็ว

             if(rigidbody.velocity.sqrMagnitude > maxVelocity)             
             {                 
               //smoothness of the slowdown is controlled by the 0.99f,                  
               //0.5f is less smooth, 0.9999f is more smooth                     
               rigidbody.velocity *= 0.99f;             
             }

หน้าคล้ายกัน

คล้ายกันหน้ากับตัวอย่าง

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................