Danil777
sadd
0 0

p_Velocity += new Vector3(0, 0 , 1); } if (Input.GetKey (KeyCode.S)){ p_Velocity += new Vector3(0, 0, -1); } if (Input.GetKey (KeyCode.A)){ p_Velocity += new Vector3(-1, 0, 0); } if (Input.GetKey (KeyCode.D)){ p_Velocity += new Vector3(1, 0, 0); } return p_Velocity; } }

Updated 7 months ago

dsad
0 0

newPosition.x = transform.position.x; newPosition.z = transform.position.z; transform.position = newPosition; } else{ transform.Translate(p); } } private Vector3 GetBaseInput() { Vector3 p_Velocity = new Vector3(); if (Input.GetKey (KeyCode.W)){

Updated 7 months ago

dsa
0 0

} else{ totalRun = Mathf.Clamp(totalRun * 0.5f, 1f, 1000f); p = p * mainSpeed; } p = p * Time.deltaTime; Vector3 newPosition = transform.position; if (Input.GetKey(KeyCode.Space)){ transform.Translate(p);

Updated 7 months ago

sad
0 0

float f = 0.0f; Vector3 p = GetBaseInput(); if (Input.GetKey (KeyCode.LeftShift)){ totalRun += Time.deltaTime; p = p * totalRun * shiftAdd; p.x = Mathf.Clamp(p.x, -maxShift, maxShift); p.y = Mathf.Clamp(p.y, -maxShift, maxShift); p.z = Mathf.Clamp(p.z, -maxShift, maxShift);

Updated 7 months ago

hgf
0 0

void Update () { lastMouse = Input.mousePosition - lastMouse ; lastMouse = new Vector3(-lastMouse.y * camSens, lastMouse.x * camSens, 0 ); lastMouse = new Vector3(transform.eulerAngles.x + lastMouse.x , transform.eulerAngles.y + lastMouse.y, 0); transform.eulerAngles = lastMouse; lastMouse = Input.mousePosition;

Updated 7 months ago

c
0 0

float mainSpeed = 5.0f; float shiftAdd = 5.0f; float maxShift = 5.0f; float camSens = 0.25f; private Vector3 lastMouse = new Vector3(255, 255, 255); private float totalRun= 0.5f;

Updated 7 months ago

fly
0 0

using System.Collections; using System.Collections.Generic; using UnityEngine; public class FlyCamera : MonoBehaviour { float mainSpeed = 5.0f; float shiftAdd = 5.0f; float maxShift = 5.0f; float camSens = 0.25f; private Vector3 lastMouse = new Vector3(255, 255, 255); private float totalRun= 0.5f;

Updated 7 months ago

Updated 7 months ago

Forma
0 0

Updated 9 months ago

demom
0 0

Updated 10 months ago

Library
0 0

25.06.21

Updated 1 year ago

Almera
0 0

Updated 2 years ago