crampté
This commit is contained in:
parent
3fc57e3a64
commit
afe60bae57
316 changed files with 104592 additions and 360 deletions
|
@ -8,21 +8,25 @@ 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);
|
||||
}
|
2
Assets/Scripts/CameraMouvement.cs.meta
Normal file
2
Assets/Scripts/CameraMouvement.cs.meta
Normal file
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1f894d8f1147824dca47609a059e3c28
|
|
@ -1,2 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9c8ad113b549ec9a0ac0bedf3875c19e
|
Loading…
Add table
Add a link
Reference in a new issue