Reworked camera handling and localization a bit
This commit is contained in:
@@ -43,10 +43,10 @@ namespace Assets.Scripts.Player
|
||||
return null;
|
||||
}
|
||||
|
||||
public void lookAround(Vector2 view, Vector2 speed)
|
||||
public void LookUpAndDown(Vector2 view, Vector2 speed)
|
||||
{
|
||||
GameObject target = GameObject.Find("targetLooking");
|
||||
target.transform.localPosition = target.transform.localPosition + new Vector3(0,view.y,0) * speed.x;// * Time.deltaTime;
|
||||
target.transform.localPosition = target.transform.localPosition + new Vector3(0,view.y,0) * speed.y;// * Time.deltaTime;
|
||||
if(target.transform.localPosition.y >= 2){
|
||||
target.transform.localPosition = new Vector3(target.transform.localPosition.x,2f,target.transform.localPosition.z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user