Created
February 1, 2015 10:59
-
-
Save lewa-j/c4bbefdba7efcf3978c6 to your computer and use it in GitHub Desktop.
Move
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Move() | |
{ | |
Vector3 newPos = transform.position; | |
float TmpMoveSens = PlayerMoveSens * Time.deltaTime; | |
newPos += (transform.forward*Input.GetAxis("Vertical")) * TmpMoveSens; | |
newPos += (transform.right*Input.GetAxis("Horizontal")) * TmpMoveSens; | |
// gravity | |
//newPos.y -= 3; | |
Vector3 Trace = GameManager.Ins.BSP.Move (transform.position, newPos, 0); | |
transform.position = Trace; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment