Horje
how to set rigidbody velocity in unity Code Example
how to set rigidbody velocity in unity
//Set Velocity to a certain speed
[SerializeField] private float maxSpeed = 10;
[SerializeField] private Rigidbody rb;

void FixedUpdate() {
  if(rb.velocity.magnitude > maxSpeed) {
    rb.velocity = rb.velocity.normalized * maxSpeed;
  }
}
unity how to set rigidbody velocity
Vector3 velocity = new Vector3(10f/*x*/, 10f/*y*/, 10f/*z*/);
GetComponent<Rigidbody>().velocity = velocity;
rigidbody velocity c# unity
//for rigidbody2D
GetComponent<Rigidbody2D>().velocity =new Vector2(40,0);
rigidbody velocity
rb.velocity = new Vector3(0, 10, 0);




Csharp

Related
write text files with C# Code Example write text files with C# Code Example
c# check if string is path or file Code Example c# check if string is path or file Code Example
delete file from FTP c# Code Example delete file from FTP c# Code Example
add object to list c# Code Example add object to list c# Code Example
c# palidrone Code Example c# palidrone Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10