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
ConvertDataTableToHTML
GetChange
sdfghjuyhtgrfedsdf
WallPascal
1
Events
Fórum ➡ Border of a string S with at least 3 non-overlapping solutions ( yield version ) ♦
actions and tasks
default branch name
Upgrade