playMaker

Author Topic: Mouse Pick 2d causes different results when monitor resolution is changed  (Read 2985 times)

pab

  • Playmaker Newbie
  • *
  • Posts: 4
Can someone test this out? All they have to do is use the 2d mouse pick event with Unity 5 and change their desktop monitor settings from a 4:3 aspect ratio to a 16:9 aspect ratio and test out the following in game resolutions: 1366 x 768, 640 x480, 1280 x 960.

____

I'm creating a little organization game based on library work.

The idea: When the first book is clicked, it goes to the first location. When the second book is clicked, it goes to the second location. Etc.

Problem: When I use 2d mouse pick in any resolution outside of my desktop resolution (1366 x 768) 2d mouse pick never works in the BUILD (stand alone linux / windows). Works fine in the editor.

Set up: I used regular unity sprites (green text) and 2dtoolkit sprites (other colors). I tried 2dtoolkit camera, did not work. Tried the regular Unity camera, did not work. I downloaded the 2d actions from the manual. Camera tag was set to main camera.

I'm using Unity pro 5.02, 64 bit. I upgraded the apis of playmaker.

1366 x 768. As you can see, it works perfectly.

640 x 480. 4:3 aspect ratio. As you can see, I try to click on stuff and sometimes randomly, a completely different book gets selected.

1280 x 960. Same thing happens at a higher resolution. (4:3)

Set up

Array Setup
Mouse setup
Resolution settings
Build Settings Other
Physics 2d settings


Edit 1: If I set my monitor to 1280 x 960, both the 1366 x 768 and 640 x 480 settings work. I have no idea why.

Edit 2: When I set my monitor to 1280 x 960,  720 x 480 doesn't work.

Edit 3: When I set my monitor to 1366 x 768, 800 x 600 doesn't work but 1600 x 1200 does.

Edit 4: I'm not sure what the problem is but I'm guessing that it might have to do with the monitor. I'm using an Asus monitor.
« Last Edit: June 06, 2015, 09:02:05 PM by pab »

pab

  • Playmaker Newbie
  • *
  • Posts: 4
Bumping.

Could this be a bug or is it something else? This is the monitor I'm using:

http://www.newegg.com/Product/Product.aspx?Item=N82E16824236100

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 I think you are hitting a Unity bug ( can you get the latest patch and test again?). I recall seeing on the various logs the mouse position wrong when resizing on windows or something.

The action use Input.mousePosition so there isn't anything done as far as manual control for that action.

If this turns out to be unreliable, you'll need to come up with a different solution, letting each 2d sprites be responsible for handling their own events and forward this to a manager, then you won't be relying on mouse position anymore.


 Are on Unity 4 or 5?

 Bye,

 Jean

pab

  • Playmaker Newbie
  • *
  • Posts: 4
Thanks for replying. I am using the Unity 5.02 (latest patch) and using playmaker 1.78 (I downloaded, deleted, and reimported twice)

My workaround is removing the ability to choose resolutions. I'm planning on setting up a 2dtoolkit camera to use the five basic aspect ratios. (4:3, 3:2, 16:10, 16:9). The first scene will ask the player to select their monitor resolution.

I'll re-download unity 4.6 and see what happens. I'll post a reply later since I have slow internet.
« Last Edit: June 08, 2015, 08:03:00 PM by pab »

pab

  • Playmaker Newbie
  • *
  • Posts: 4
http://gfycat.com/FarPlaintiveDaddylonglegs

A simple test. I have the monitor set at 1366 x 768 and I'm playing at 1024 x 768. I used the Unity 4.6.6 update and the latest 2dtoolkit and playmaker.

Same thing happens when using a regular camera.

I made a report to unity. Hopefully, it's a unity bug.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 Good. Let us know how it works out.

 Bye,

 Jean