playMaker

Author Topic: 'Lock cursor' no longer works in Unity 5  (Read 5148 times)

gheeDough

  • Playmaker Newbie
  • *
  • Posts: 39
    • indie game school
'Lock cursor' no longer works in Unity 5
« on: April 21, 2015, 07:06:20 AM »
Hi all,

I just created a test scene with nothing but a plane, the standard 1st-person controller and an FSM to lock the cursor. This used to work, but maybe something something changed in Unity 5 that broke it. Has anyone else noticed this?

Edit: the cursor hides upon being clicked and the custom cursor appears as well as expected; however, it no longer locks.
« Last Edit: April 21, 2015, 07:27:22 AM by gheeDough »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

gheeDough

  • Playmaker Newbie
  • *
  • Posts: 39
    • indie game school
Re: 'Lock cursor' no longer works in Unity 5
« Reply #2 on: April 21, 2015, 07:46:31 AM »
Thanks Lane! That thread didn't show up in my 'lock cursor' search  ::)

While this does a good job of locking the cursor, it doesn't actually lock it in the centre of the window but in the top right. I can add positive values in the hot spot area (which position the custom cursor even further into the top-right corner), but negative values get rid of my custom cursor and replace it with an unlocked system mouse cursor.

Edit: sys specs: OS X 10.10.3, Unity 5.0.0, Playmaker 1.7.8.3. Downloading 5.0.1 to  see if it makes a difference.
« Last Edit: April 21, 2015, 08:05:59 AM by gheeDough »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: 'Lock cursor' no longer works in Unity 5
« Reply #3 on: April 21, 2015, 08:13:00 AM »
You may way want to direct those sorts of issues at Unity, theres been a number of reported issues with the new API but I don't think anyone has really pursued bug reporting on it. Most people I've talked to that have issues with it just find a workaround and move on.

Also, it is not the same as the old way of locking the cursor. They scrapped the old one and replaced it with a new system so it is subject to behaving differently.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

gheeDough

  • Playmaker Newbie
  • *
  • Posts: 39
    • indie game school
Re: 'Lock cursor' no longer works in Unity 5
« Reply #4 on: April 21, 2015, 08:23:05 AM »
Cool, will do, thanks Lane.

Is there a workaround you could recommend?