Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Unity Wall Climbing script Version 1
using UnityEngine; using System.Collections; public class MYCLASSNAME : MonoBehaviour { Transform chController; bool inside = false; float heightFactor = 3.2f; private FPSInputController FPSInput; void Start (){ FPSInput = GetComponent<FPSInputController>(); } void OnTriggerEnter ( Collider Col ){ if(Col.gameObject.tag == "Ladder") { FPSInput.enabled = false; inside = !inside; } } void OnTriggerExit ( Collider Col ){ if(Col.gameObject.tag == "Ladder") { FPSInput.enabled = true; inside = !inside; } } void Update (){ if(inside == true && Input.GetKey("w")) { chController.transform.position += Vector3.up / heightFactor; } } [RPC] void Test (){} }
run
|
edit
|
history
|
help
0
Fórum ➡ Using Regex to insert "item" tags into the unique "list" tag of an XML data ♦
Pyramid
FindSmallest
services
task 1
sdfghnjmkuyhtgrfed
static, private, public constructor in C#
Danny Garcia vs. Jose Benavidez Jr Live Stream
Конструктор класса
ICollection<T>.Add(T) - Performance Test