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
Cs
Integers Array manipulation examples
dsadsadsa
Towers of Hanoi
Task 1_3
Code challenge: Integer Comparison - Overkill - Function Dictionary
badsql_match
linq
edmond@DESKTOP-M2BC2LH
a