Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by sleepandpancakes · Apr 03, 2017 at 06:49 AM · cursorwindows 10cursor-customization

Cursor issues: strange white square under cursor

I am using a custom cursor for my game, and one of my playtesters playing on Windows 10 reported that a white pixelated square appears under his cursors as shown in the attached image.

cursor The hotspot (set at (12.5, -3)) is under the square instead of the actual cursor. This has not happened to any other users, including other Windows 10 users. I have no idea what could be causing this. He does not have any custom cursors installed on his computer. I found [this answer][2] but it wasn't very helpful. I have attached an image of my cursor settings as well. The cursor image is 25x25. I tried forcing it to 36x36 using the NonPowerOf2 setting but the bug still persists. Can anyone help me understand why this is happening? I am running Unity 5.5.0f3 Personal.

settings [2]: http://answers.unity3d.com/questions/920862/strange-behavior-on-cursor.html

screen-shot-2017-04-02-at-65248-pm.png (80.5 kB)
17776973-10158289644840198-1067290496-o.jpg (22.5 kB)
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sleepandpancakes · Apr 04, 2017 at 09:25 PM 0
Share

Is there a better place to ask this question? I have no idea why this is happening or what I can do to fix it.

avatar image toddisarockstar · Apr 05, 2017 at 04:50 PM 0
Share

Ive never seen this but I would try redrawing your cursor image with more transparent space around it so that the hotspot position is not "out of bounds" in relation to the cursor image.

avatar image sleepandpancakes toddisarockstar · Apr 05, 2017 at 05:21 PM 0
Share

The hotspot position is set to be at the tip of the caret symbol. It's only in this playtester's case that it lies under the white box.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by toddisarockstar · Apr 05, 2017 at 05:16 PM

Ive never seen this but I would try redrawing your cursor image with more transparent space around it so that the hotspot position is not "out of bounds" in relation to the cursor image.

in many games its common practice to hide the windows cursor and use use your own cursor anyways! This way you get cool control over scaling, color and current image anyways:)

Also the ability to force the cursor to places or move it with a joystick. here is a super simple example:

     public Texture2D cursorimage;

    // use this next variable anywhere in your code that would use mouse position
    Vector2 mymouse;
 
     void Start () {
         Screen.showCursor = false;
     }
     
 
     void OnGUI(){
         mymouse = new Vector2 (Input.mousePosition.x,Input.mousePosition.y);
         GUI.DrawTexture (new Rect (mymouse.x,Screen.height-mymouse.y, 16, 16), cursorimage);
         }

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sleepandpancakes · Apr 05, 2017 at 05:29 PM 0
Share

I guess I'll give this a try and see if it fixes anything. I had just wanted a simple cursor so I thought it'd be easiest to change it via Unity's settings.

avatar image sleepandpancakes · Apr 14, 2017 at 09:32 PM 0
Share

I implemented this and it fixes the issue with the white square but moving the cursor doesn't feel as responsive as with the hardware cursor. Is there any way to improve it?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How Can I Lock The Cursor Position? 1 Answer

Artifacts on cursor when using CursorMode.Auto 0 Answers

change mouse cursor on mouseover 3 Answers

Custom Cursor? How does it work? 3 Answers

HIdden cursor slider issue 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges