playMaker

Author Topic: [Solved] Camera resetting look direction after mouse look reset  (Read 803 times)

ForeverAutumn

  • Playmaker Newbie
  • *
  • Posts: 6
[Solved] Camera resetting look direction after mouse look reset
« on: February 10, 2021, 03:10:01 PM »
I have a camera with an FSM that has just a mouse look invert action in it and this camera is set as a child to a moving vehicle.

The problem I'm having is when I tab to the menu (I have  an enable FSM action set to disable and reset on exit so the camera isn't moving while the mouse is menu menu, then when you hit tab the FSM resets to enable) is that the camera's direction resets to either the original position the camera started at when the scene started or looks up almost 90 degrees.

Is there a way I can disable the mouse look for the menu and when I exit the menu you state I return to the direction I was looking at from right before I entered the menu?

Thank you.
« Last Edit: February 14, 2021, 08:29:16 PM by ForeverAutumn »

nuFF3

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 74
  • Are we even real?
    • One Month Studio
Re: Camera resetting look direction after mouse look reset
« Reply #1 on: February 12, 2021, 11:11:08 AM »
Yes this is a known "issue" with the Mouse Look actions.

The best way to go about this is to never leave the state with the Mouse Look action, but to set it's sensitivity to 0 when a menu is open, and then back to previous sensitivity once the menu is closed.

I do this with all my projects, where I have a separate FSM that sets the sensitivity float variable of my FSM with the Mouse Look action.

ForeverAutumn

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Camera resetting look direction after mouse look reset
« Reply #2 on: February 14, 2021, 01:38:29 AM »
Thank you very much for your help. That seemed to work.

If anyone finds this thread later on with the same problem what I did was create a global float variable with the value I wanted the sensitivity set to and set the sensitivity in the mouse look action to the global float. Then in a separate FSM I had set the float value to zero in the state that pauses the game.

Again thank you for your help.