Question by
pritxm · Jul 30, 2020 at 05:35 AM ·
scripting beginnerscriptingbasics
Rotating a player around the centre with touch controls.
Hello everyone. My player does revolve around the centre object with this :
private void FixedUpdate()
{
transform.RotateAround(Vector3.zero, Vector3.forward, movement * Time.fixedDeltaTime * -moveSpeed);
}
This works on keyboard and I need it for touch controls. Like the player should move to left along the radius when i touch the left side of the screen and same for the right side. Im having a hardtime figuring out the controls for touch for this. Any help would be appreciated. Thank You.
,
Hello everyone. My player does revolve around the centre object with this :
private void FixedUpdate()
{
transform.RotateAround(Vector3.zero, Vector3.forward, movement * Time.fixedDeltaTime * -moveSpeed);
}
But this works on keyboard and I need it for touch controls. Like the player should move to left along the radius when i touch the left side and same for the right side. Im having a hardtime figuring out the controls for touch for this. Any help would be appreciated.
Comment