Add Velocity To Rigidbody Unity Code Example


Example 1: unity how to set rigidbody velocity

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

Example 2: rigidbody velocity c# unity

//for rigidbody2D GetComponent<Rigidbody2D>().velocity =new Vector2(40,0);

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable