added ads camera
This commit is contained in:
@@ -49,6 +49,7 @@ namespace Darkmatter.Presentation
|
||||
[Inject] private PlayerConfigSO playerConfig;
|
||||
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
@@ -58,7 +59,7 @@ namespace Darkmatter.Presentation
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
//HandleAim();
|
||||
HandleAim();
|
||||
HandleShooting();
|
||||
}
|
||||
|
||||
@@ -124,8 +125,8 @@ namespace Darkmatter.Presentation
|
||||
if(Physics.Raycast(ray,out RaycastHit hitPoint, 100f,groundLayer))
|
||||
{
|
||||
mouseWorldPos= hitPoint.point;
|
||||
aim.position = mouseWorldPos;
|
||||
//aim.position = Vector3.Lerp(aim.position, hitPoint.point, Time.deltaTime * smoothing);
|
||||
//aim.position = mouseWorldPos;
|
||||
aim.position = Vector3.Lerp(aim.position, hitPoint.point, Time.deltaTime * smoothing);
|
||||
}
|
||||
|
||||
Vector3 aimDir = (mouseWorldPos - transform.position).normalized;
|
||||
@@ -147,7 +148,7 @@ namespace Darkmatter.Presentation
|
||||
public void SetCameraRotation(float pitch, float yaw)
|
||||
{
|
||||
cinemachineFollowTarget.rotation = Quaternion.Euler(pitch, yaw, 0);
|
||||
HandleAim();
|
||||
|
||||
//transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(0,yaw,0), Time.deltaTime*turnSpeed);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user