Horje
remove force unity Code Example
remove force unity
using UnityEngine;

public class MyObject : MonoBehaviour
{
	private RigidBody m_rb;
    
    void Start()
    {
    	m_rb = GetComponent<RigidBody>();
    }
    
    // Do it in FixedUpdate() if it's triggered by physics (collision-based for
    // example), Update() otherwise.
    void FixedUpdate()
    {
    	if(yourCondition)
        {
        	m_rb.velocity = Vector3.zero;
        }
    }
}




Csharp

Related
c# To Pascal Case Code Example c# To Pascal Case Code Example
c# .net 3.5  post json httpclient Code Example c# .net 3.5 post json httpclient Code Example
linq c# Code Example linq c# Code Example
how to get an arrays length in c# Code Example how to get an arrays length in c# Code Example
how to decrease velocity of a Unity rigidbody Code Example how to decrease velocity of a Unity rigidbody Code Example

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