Unity limit rigidbody rychlost

Příklady kódu

3
0

unity jak nastavit rigidbody rychlost

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

unityy limit rigidbody rychlost

             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;             
             }

V jiných jazycích

Tato stránka je v jiných jazycích

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