Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
Extension Methods (edited)
Testing 10
Lesson 2-2
custom stack Implementation
RHGFEC WQWQW
Joro Football Player
enums with extension method: better
Deadlock Example
sdcasdcasdcsadxcd
card 2
Please log in to post a comment.