playMaker

Author Topic: Mouse Look issue[SOLVED]  (Read 6779 times)

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: Mouse Look issue[SOLVED]
« Reply #15 on: April 21, 2020, 12:30:51 PM »
Megmaltese! :D

I literally JUST discovered this issue now that you're explaining about the rotation. 100% true! Enters state and suddenly my character is looking up in a random direction lol

How did you end up fixing this?? (if you did)

Thank you for even trying to word this problem :P

-craigz

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Mouse Look issue[SOLVED]
« Reply #16 on: April 21, 2020, 05:36:04 PM »
DJDino was so kind to modify the action and you can add an angle offset to it now.
Not the best thing, but it should work.

https://hutonggames.com/playmakerforum/index.php?topic=19382.msg84566#msg84566
« Last Edit: April 21, 2020, 05:40:15 PM by megmaltese »

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: Mouse Look issue[SOLVED]
« Reply #17 on: April 22, 2020, 02:57:54 AM »
Ahhh! I hadn't looked through him sample but I had imported the action. Okay so you still have to manually add the offset. Got it! I was originally thinking along your train of thought like 'why couldnt it just take the rotation of the game object initially??' 🤦‍♂️

Thank you! :D

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Mouse Look issue[SOLVED]
« Reply #18 on: April 22, 2020, 03:27:50 AM »
I wasted also some time to re-align the object after game start, su... I'm with stupid  ;D ;D ;D

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Mouse Look issue[SOLVED]
« Reply #19 on: May 01, 2020, 10:35:00 AM »
Houston we got a problem here.
Each time the state with the Mouselook is entered, the offset is added to the object.

The right way to do this action is to initialize it by getting the rotation vector of the parent object, and storing the variables in the script vector.

And then... nothing. Then that's it. From that moment on, the action is exactly the same old Mouselook we know and love.
It just need a small initialization phase where the parent object vector is stored in the action vector data.

Anyone so kind to do this, in these times of quarantine?  :D

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Mouse Look issue[SOLVED]
« Reply #20 on: May 01, 2020, 10:40:04 AM »
Or wait, I solved it, with a little trick.
I have put an Init state where the Mouselook action is called only once, so that the offset is added.
Then the every frame action happens in another state, with 0 offset.

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Mouse Look issue[SOLVED]
« Reply #21 on: May 01, 2020, 04:04:52 PM »
Back to black: it doesn't seem to work. My "solution" introduces other problems.