Р
Size: a a a
Р
P#
Р
DV
Р
I
var pos = transform.position;
transform.position = new Vector3(
Mathf.Clamp(pos.x, GetCameraBounds().xMin, GetCameraBounds().xMax),
0,
Mathf.Clamp(pos.z, GetCameraBounds().yMin, GetCameraBounds().yMax)
);
var movement = new Vector3 (_inputDir2d.x, 0, _inputDir2d.y);
playerRigidbody.AddForce(movement * movementSpeed);
Р
t
DV
var pos = transform.position;
transform.position = new Vector3(
Mathf.Clamp(pos.x, GetCameraBounds().xMin, GetCameraBounds().xMax),
0,
Mathf.Clamp(pos.z, GetCameraBounds().yMin, GetCameraBounds().yMax)
);
var movement = new Vector3 (_inputDir2d.x, 0, _inputDir2d.y);
playerRigidbody.AddForce(movement * movementSpeed);
DV
⠀
I
DV
⠀
P#
ws
P#
Р
ws