cam things
This commit is contained in:
parent
afe60bae57
commit
e9af1b413a
7 changed files with 3647 additions and 129 deletions
|
@ -8,25 +8,21 @@ public class CameraMouvement : MonoBehaviour
|
|||
private Vector2 _moveInput;
|
||||
public void HandleCameraMovement(InputAction.CallbackContext context)
|
||||
{
|
||||
print("Handle Camera");
|
||||
_moveInput = Vector2.zero;
|
||||
if (context.phase == InputActionPhase.Performed)
|
||||
{
|
||||
_moveInput = context.ReadValue<Vector2>();
|
||||
print("Move Input");
|
||||
print(_moveInput);
|
||||
}
|
||||
}
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
print("START CAMERA MY BOYYY");
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
print("Update");
|
||||
var mouvement = moveSpeed * Time.deltaTime * (new Vector3(_moveInput.y, 0, -_moveInput.x));
|
||||
transform.Translate(mouvement, Space.World);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue