Horje
how to decrease velocity of a Unity rigidbody 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
rb.velocity = new Vector3(0, 10, 0);
how to decrease velocity of a Unity rigidbody
//Drecrese Rigidbody Speed
[SerializeField] private Rigidbody rb;

void FixedUpdate() {
  //Decrease speed
  rb.velocity -= rb.velocity * 0.1f;
}




Csharp

Related
mvc c# return renderPartial Code Example mvc c# return renderPartial Code Example
get quaternion from vector unity Code Example get quaternion from vector unity Code Example
c# list add to list Code Example c# list add to list Code Example
webp to jpg Code Example webp to jpg Code Example
c# add list to list Code Example c# add list to list Code Example

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