playMaker

Author Topic: Lock Mouse cursor - Xbox One  (Read 2544 times)

Moonwall

  • Playmaker Newbie
  • *
  • Posts: 11
Lock Mouse cursor - Xbox One
« on: December 07, 2016, 04:36:04 PM »
Hi guys!
I'm making an Xbox port of my PC game. I use PlayMaker to script everything. Basically the game is a first person adventure (like Gone Home, or Firewatch). To use an object I use an action called "Mouse Pick Event" - raycasting from mouse. I checked the game on my Xbox One dev kit, and I was surprised that "Mouse Pick Event" works fine - exactly like it works on PC. But there is one little problem - I have a script to lock mouse cursor in the center of the screen, and change it's image to a crosshair. But on Xbox the cursor is locked in the corner instead (at 0,0 position) - I can see it, because it still has the crosshair image on. I guess it's locked at 0,0 because there is no mouse cursor on Xbox, right? So I am looking for any workaround - maybe someone will have some idea? I was thinking that maybe if there is a way to enable mouse cursor on Xbox, then I could lock it in the center of the screen?

Thank you very much for any suggestions!

terri

  • Sr. Member
  • ****
  • Posts: 389
    • terrivellmann.tumblr.com
Re: Lock Mouse cursor - Xbox One
« Reply #1 on: December 07, 2016, 04:43:14 PM »
I have no experience with Xbox ports, but you could instead of locking/changing the cursor, just have the crosshair image aligned to the middle of the screen

Moonwall

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Lock Mouse cursor - Xbox One
« Reply #2 on: December 07, 2016, 05:02:13 PM »
Thank you for your reply! I could do this, but actually the Mouse Pick Event gets active when mouse is in the middle of an object - so if mouse is locked at the 0,0, then the said object gets activated when this corner is above it.

terri

  • Sr. Member
  • ****
  • Posts: 389
    • terrivellmann.tumblr.com
Re: Lock Mouse cursor - Xbox One
« Reply #3 on: December 08, 2016, 10:52:39 AM »
oh, I thought that was working fine
you can replace mouse pick event with a raycast, cast from the camera, with a direction of x0 y0 z1
you'll need other actions for it to work the same as mouse pick event but it shouldn't be too difficult