playMaker

Author Topic: mouse rotate question  (Read 861 times)

acidicloop

  • Playmaker Newbie
  • *
  • Posts: 5
mouse rotate question
« on: November 25, 2021, 10:17:24 AM »
So Im following the Grab object tutorial on Hutong Games youtube, and I wanted to ad an inspection element once the player is holding the object. So in the Holding state, he does a GetButtonDown for Fire2, which then transitions into whether its dropped or thrown. In this state I added a GetMouseButtonDown Left click and transition it into a Rotate state. In the rotate state I have the picture in the attachment. When i pick up the object in game, if i hold left mouse, the object rotates with my mouse movement, but my mouse movement is also being used to look around the scene. Is there a way to freeze it in place while im holding left so the mouse movement only affects the rotating state?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: mouse rotate question
« Reply #1 on: November 25, 2021, 10:48:53 AM »
Hi.
try this :



The Float Multiply is to set a negative rotation, you can add for x as well if you need and you can remove Y if you don't need.

also try fixed update and Space 'Self'
and set the angle variables to different ones, to see what fits best for you.