What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-24 23:25:02
character controller unity crouch
#pragma strict private var ch : CharacterController; private var startHeight : float; // initial height function Start() { ch = GetComponent(CharacterController); startHeight = ch.height; } function Update() { var newH : float = startHei... Add solution -
C# 2022-03-04 05:20:02
how to move player with finger touch in unity
if (Input.touchCount > 0) { Touch touch = Input.GetTouch(0); // get first touch since touch count is greater than zero if (touch.phase == TouchPhase.Stationary || touch.phase == TouchPhase.Moved) { // get the touch position ... Add solution -
C 2022-02-06 13:30:20
first person view unity
// C Sharp public Transform followTarget; public Vector3 targetOffset; public float moveSpeed = 2f; private Transform myTransform; void Start(){ myTransform = transform; } public void SetTarget(Transfrom aTransform){ followTarget = aTransform; } vo... Add solution -
Other 2021-11-16 14:28:08
unity color lerp
Color.Lerp Declaration public static Color Lerp(Color a, Color b, float t); Parameters a Color a. b Color b. t Float for combining a and b. Description Linearly interpolates between colors a and b by t. t is clamped between 0 and 1. When t is 0 retur... Add solution -
C# 2021-11-06 22:09:09
unity character controller moving platform
using System.Collections; using System.Collections.Generic; using UnityEngine; public class SC_MovingPlatform : MonoBehaviour { public Transform activePlatform; CharacterController controller; Vector3 moveDirection; Vector3 activeGlobalP... Add solution -