Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

move in the direction that player is facing unity

float movementSpeed = 100f;

void Update()
{
	rb.GetComponent<Rigidbody>().velocity = transform.forward * Time.deltaTime * movementSpeed;
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: check if gameobject exists unity 
Csharp :: c# try catch with error message 
Csharp :: c# print out 
Csharp :: how to change scenes with button press in unity c# 
Csharp :: loop through multidimensional array c# 
Csharp :: how to make c# program run cmd commands 
Csharp :: c# form formborderstyle none move 
Csharp :: open new window c# wpf 
Csharp :: Unity rotate player to mouse point slowly 
Csharp :: remap float c# 
Csharp :: c# counting lines 
Csharp :: c# kill all processes by name 
Csharp :: how to make a button open window in wpf 
Csharp :: backcolor c# hexadecimal 
Csharp :: unity c# set list to set active true 
Csharp :: c# copy list without reference 
Csharp :: disable script in unity 
Csharp :: UnityEngine.Transform.get_position () (at <a0ef933b1aa54b668801ea864e4204fe:0) Gamekit3D.MeleeWeapon.BeginAttack (System.Boolean thowingAttack) 
Csharp :: xamarin picker item 
Csharp :: application server types in .net 
Csharp :: c# rename file 
Csharp :: override indexation C# 
Csharp :: gcd c# 
Csharp :: c# serialize to xml 
Csharp :: c# get path without filename 
Csharp :: remove all letters from string c# 
Csharp :: c# list get element from end 
Csharp :: += meaning c# 
Csharp :: c# paste from clipboard 
Csharp :: c# return list 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =