Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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

PREVIOUS NEXT
Code Example
Csharp :: random mac address c# 
Csharp :: first person mouse look unity 
Csharp :: add spaces in string 
Csharp :: c# code to read txt file line by line and split 
Csharp :: unity tilemap get all tiles 
Csharp :: Sort ListBox numerically in C# 
Csharp :: decrease image size C# 
Csharp :: assembly project name c# .net 
Csharp :: how to iterate between hour range in c# 
Csharp :: unity vector3 to array 
Csharp :: c# example code 
Csharp :: primitive types c# 
Csharp :: c# foreach namevaluecollection 
Csharp :: unity model ripper 
Csharp :: linq foreach c# 
Csharp :: c# nullable generic 
Csharp :: LINQ: 2 join with group by 
Csharp :: c# get distinct values all fields from list 
Csharp :: new datetime c# 
Csharp :: unity master volume changer 
Csharp :: longest substring without repeating characters 
Csharp :: bytes size c# 
Csharp :: how to sort a dictionary by value in c# 
Csharp :: how to use buildcontext in initstate flutter 
Csharp :: unity check if gameobject is inside collider 
Csharp :: foreach c# linq example 
Csharp :: unity auto scroll 
Csharp :: unique field in class model .net core 
Csharp :: how to make a block disappear in unity 
Csharp :: C# top down view player movement script 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =