playMaker

Author Topic: Mouse look on z axis[SOLVED]  (Read 3126 times)

Leudge

  • Playmaker Newbie
  • *
  • Posts: 8
Mouse look on z axis[SOLVED]
« on: December 16, 2013, 03:20:22 PM »
First of all, excuse my english, I'm French

Hello, I'd like to rotate an object on the z axis when the mouse go up and down. I tried the mouse look action but, it's only possible with the x and y axis. So i'd like to know if there is an other possibility
Thank you  :)
« Last Edit: December 17, 2013, 01:33:33 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse look on z axis
« Reply #1 on: December 16, 2013, 03:30:40 PM »
Salut :)

 Ok, you simply need to bind the y value of the mouse input  and use the "rotate" action.

so first action is "get axis" with its axis name set to "Mouse Y", you store that value in a flaot variable, let's call it "mouse y input", then the second action is "Rotate" and you inject "mouse y input" on the zAngle property of Rotate, and select "Self" for the Space property.

Does that make sense?

 or are you actually trying to have the object "Looking" at the mouse for real? not just turning based on the mouse movement, not the actual mouse position? If so, have a look at this  ;)

http://hutonggames.com/playmakerforum/index.php?topic=5238.msg24998#msg24998


Bye,

 Jean

Leudge

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Mouse look on z axis
« Reply #2 on: December 16, 2013, 04:09:55 PM »
Thank you very much, that's exactly what i needed, it work perfectly
thank you again :)
bye