playMaker

Author Topic: Keyboard Camera Control Rotate Tilt not working properly...  (Read 2037 times)

J1RG

  • Playmaker Newbie
  • *
  • Posts: 3
Keyboard Camera Control Rotate Tilt not working properly...
« on: November 17, 2013, 07:52:53 PM »
So I have figured out how to get holding shift to switch WASD from controlling movement to controlling the camera... for the most part.  :-\

I have one FSM attached to my First Person Prefab object and one attached to its Main Camera. The first controls the character's movement and then its turning when shift is held. The second controls the camera's tilt when shift is held. I have a Float Clamp set on the second to limit the tilt (min: -60, max: 60).

The turning works correctly but the tilting does not. The clamp seems to work fine for stopping the downward tilt from going past 60º but when tilting upward past 0º degrees the camera resets to 60º.

Any ideas on how to fix this?

I've attached the FSM templates to this post if anyone wouldn't mind looking them over.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Keyboard Camera Control Rotate Tilt not working properly...
« Reply #1 on: November 19, 2013, 01:08:05 AM »
Hi,

Have you try my suggestion on the other post to limit your angle based on a relative offset that you compute yourself instead of relying on the actual angle of the transform itself?

bye,

 Jean

J1RG

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Keyboard Camera Control Rotate Tilt not working properly...
« Reply #2 on: November 22, 2013, 01:43:05 PM »
I am working on it but I am running into some problems.

Should I switch from rotate to an iTween?

Could you help me some more by explaining the actions needed and their order within the state?

Thank you. :)
« Last Edit: November 22, 2013, 07:28:44 PM by J1RG »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Keyboard Camera Control Rotate Tilt not working properly...
« Reply #3 on: November 28, 2013, 05:06:48 AM »
Hi,

 iTween is not suitable for dynamic features. What problems are you running into?

bye,

 Jean