playMaker

Author Topic: Mouse Move with Tilt  (Read 657 times)

rizwanash

  • Junior Playmaker
  • **
  • Posts: 61
Mouse Move with Tilt
« on: September 17, 2020, 08:10:20 PM »
Hello guys,

I am trying to create a Shmup prototype by Following a tutorial. But My approach is to use Mouse X instead of Horizontal or vertical. The problem i am facing only in Tilt when Moving Left and Right. Any one can point me in a right direction here ?

Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Mouse Move with Tilt
« Reply #1 on: September 18, 2020, 02:47:17 AM »
hi,
maybe you can get the velocity to determine its rotation.

so velocity x 0 would be rotation 0
velocity -5 could be rotation -45
velocity 5 could be rotation 45

Use a float operator (every frame enabled) to multiply.
So in this example i would multiply the velocity by 5 (but you need to test what fits best)

You might want to use something like 'Smooth Look At (Direction) and set Finish Tolerance to 0 if it has one.