Controlevents are now working
This commit is contained in:
@@ -11,6 +11,16 @@ namespace Assets.Scripts.Player
|
||||
UIHandler uihandler;
|
||||
GameObject interact;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
ControlEvents.OnLookingInput += LookAround;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
ControlEvents.OnLookingInput -= LookAround;
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@@ -43,7 +53,7 @@ namespace Assets.Scripts.Player
|
||||
return null;
|
||||
}
|
||||
|
||||
public void LookAround(float pitch)
|
||||
public void LookAround(float pitch, float yaw)
|
||||
{
|
||||
transform.localRotation = Quaternion.Euler(pitch, 0f, 0f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user