- Home /
Question by
spaunn · Apr 28, 2014 at 08:44 PM ·
mouseleftmouseclick
Left mouse button not working in web player?
I have this piece of code in my game that doesn't seem to work once in the web player, the resolution is set to 960 x 600 and all code is functional in the Unity editor, anyone know why the left click isn't registering?
if (Input.GetMouseButtonDown (0)) {
targetPos = new Vector2 ((Input.mousePosition.x) / 100, (Input.mousePosition.y - 600) / 100);
moveDirection = targetPos - new Vector2 (transform.position.x, transform.position.y);
targetDist = Vector2.Distance (targetPos, new Vector2 (transform.position.x, transform.position.y));
isWalking = true;
}
Comment
Your answer
Follow this Question
Related Questions
swiping with mouse input 0 Answers
Mouse position to Isometric Grid Tile number 1 Answer
aiming with animation 1 Answer
make an object glow when mouse over 3 Answers
Bullets follow mouse after shooting in Sidescroller 1 Answer