mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-07 03:48:15 +00:00
Mouse offset and scaling must be considered also on web!
This commit is contained in:
@@ -4051,7 +4051,7 @@ Vector2 GetMousePosition(void)
|
|||||||
{
|
{
|
||||||
Vector2 position = { 0 };
|
Vector2 position = { 0 };
|
||||||
|
|
||||||
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
|
#if defined(PLATFORM_ANDROID) //|| defined(PLATFORM_WEB)
|
||||||
position = GetTouchPosition(0);
|
position = GetTouchPosition(0);
|
||||||
#else
|
#else
|
||||||
position.x = (CORE.Input.Mouse.currentPosition.x + CORE.Input.Mouse.offset.x)*CORE.Input.Mouse.scale.x;
|
position.x = (CORE.Input.Mouse.currentPosition.x + CORE.Input.Mouse.offset.x)*CORE.Input.Mouse.scale.x;
|
||||||
|
Reference in New Issue
Block a user