Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to make a character jump c#

public Rigidbody rb;

public float jumpForce;

void Awake() 
{
  rb = GetComponent<Rigidbody>();
}

void Update() 
{
	  if(Input.GetKeyDown(KeyCode.Space)) 
	{
	  rb.AddForce(0, 10 * jumpForce * Time.deltaTime, 0)
	}
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity line renderer opacity 
Csharp :: Merge two List using Linq 
Csharp :: get gameobject active state 
Csharp :: unity subtract class 
Csharp :: Show empty message in data table angular material, If no data found 
Csharp :: pricipal permission attribute in c# 
Csharp :: if input.get touch 
Csharp :: c# try parse date yyyymmdd 
Csharp :: curl rest api keycloak 
Csharp :: unity stop velocity movement 
Csharp :: c# draggable controls 
Csharp :: c# convert excel column index to letter 
Csharp :: visual studio console.writeline not showing in output window 
Csharp :: browser folder in wpf 
Csharp :: instantiate an array in c# 
Csharp :: unity error log 
Csharp :: c# read huge file 
Csharp :: dctionary literal c# 
Csharp :: base c# 
Csharp :: system.random reuses numbers 
Csharp :: c# generate random string 
Csharp :: how to move mouse with c# 
Csharp :: ascii code c# char 
Csharp :: datetime show 24 hour format c# 
Csharp :: How can I get my stripe customer ID? 
Csharp :: how to auto format c# code in visual studio 
Csharp :: How to find column name with column index in DataGridView 
Csharp :: C# varible 
Csharp :: c# insert today datetime 
Csharp :: call class c# 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =