playMaker

Author Topic: Preventing unity from losing focus from mouse movement?  (Read 3092 times)

vonpixel

  • Playmaker Newbie
  • *
  • Posts: 14
Preventing unity from losing focus from mouse movement?
« on: April 28, 2015, 12:00:17 PM »
I've built up a 3rd person controller and all kinds of stuff thats working great. I built my gamepad support first and its bang on so far and ive now turned my attention to keyboard and mouse. I did a build of my game and realized I have a problem with my mouse control and im unsure how to fix it.

Basically my camera is doing its rotation around the player based on the mouse X/Y from the input. Problem is that mouse often will find its way off the unity screen at which point unity stops accepting keyboard input (mouse look still works).

Seems like it would be a simple thing to fix? I found some stuff in unity answers about locking the mouse- but im unsure how to implement through playmaker?

Im guessing i need to somehow lock the mouse pos and then still feed the input from it into my look controls? Maybe a bool so pausing gives it focus again so that the gui events can still happen with it?

Many thanks for the help in advance!

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Preventing unity from losing focus from mouse movement?
« Reply #1 on: April 28, 2015, 12:37:00 PM »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D