playMaker

Author Topic: [SOLVED] I am tryin to create a World of Warcraft WoW style third person camera  (Read 2258 times)

paranoidray

  • Playmaker Newbie
  • *
  • Posts: 5
Hi all,

I am trying to create a World of Warcraft (WoW) style third person camera.

That means I want to only use Mouse Look if the right mouse button is pressed.

But my problem is, that the camera jumps down 90 degrees or so when I press the right mouse button. Then it works fine, it just jumps down every time I press the right mouse button, even if I don't move the mouse between presses.



I am using Ethan -> CameraPivot -> MainCamera.

State1 is just waiting for the mouse press.
State2 is using 2 Mouse Look Actions.

Mouse Y targets the CameraPivot
Mouse X targets Ethan directly.

I also tried to read mouse Y in State1 every frame so nothing accumulates before State2 is entered but no luck.

Any ideas ?


« Last Edit: November 29, 2015, 12:36:18 PM by paranoidray »

paranoidray

  • Playmaker Newbie
  • *
  • Posts: 5
Re: I am trying to create a World of Warcraft (WoW) style third person camera
« Reply #1 on: November 28, 2015, 04:43:47 AM »
Update: If I remove the minimum and maximum Y it jumps up and down now.

I also looked  at the source code and added a GetYRotation in OnEnter to reset the values, no luck... :-(

paranoidray

  • Playmaker Newbie
  • *
  • Posts: 5
Re: I am trying to create a World of Warcraft (WoW) style third person camera
« Reply #2 on: November 28, 2015, 04:47:19 AM »
Here is my setup:


paranoidray

  • Playmaker Newbie
  • *
  • Posts: 5
Re: I am trying to create a World of Warcraft (WoW) style third person camera
« Reply #3 on: November 28, 2015, 05:17:47 AM »
I think I found the problem, in MouseLook.cs, there is a (rogue ?) minus sign...

transform.localEulerAngles = new Vector3(-GetYRotation(), transform.localEulerAngles.y, 0);

If you remove the - infront of the GetYRotation it seems to work so far.

That also explains, why I had to change the sign in the property editor from -15 to 15, if I only want to use at the Y axis...

I think this is a bug in the code...