playMaker

Author Topic: Odd Get Signed Angle behavior  (Read 1337 times)

RaHaN

  • Playmaker Newbie
  • *
  • Posts: 5
Odd Get Signed Angle behavior
« on: August 26, 2016, 09:17:03 AM »
Hello everyone !

I'm using the Get Signed Angle action in my game, for aiming purposes. However, I have an issue I can't seem to figure out.

First, let me explain my basic setup, visually (click the image for full view):



It's a pretty straightforward way to handle tracking of the aiming direction (i.e. where does the camera point to).

Here is my object hierarchy (a state machine handles the camera following the player object, as the Camera Rig can't be parented to it for 3C's reasons).



Some additional behaviours to better understand my setup: when the player Aims (right mouse button), the player doesn't rotate anymore on the Y axis. The Animator blends additional animations on the upper body to follow the aiming angle on the X and Y directions.

The variables "camXAngle" and "camYAngle" feed the animator (respectively HorAimAngle and VerAimAngle parameters) as shown below (click the image for full view):


However, when camXAngle is starting to depart a lot from its origin, camYAngle starts to go up - and that's what I don't understand.

Here is a video showing the issue at run time:


Changing the position of the aimCompass object doesn't solve the issue, it does moves it to another part of the Y axis rotation.

Is this normal behaviour for the Get Signed Angle action?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Odd Get Signed Angle behavior
« Reply #1 on: August 29, 2016, 07:36:22 AM »
Hi,

 Do you have some look at actions, maybe the gameobjects are starting to tilt it around as you rotate right and left which cause this drifts of values.

Can you reproduce this issue on a simple scene with two objects? does the drift happen also?

Bye,

 Jean