playMaker

Author Topic: Rotate Player According To Mouse Position  (Read 2052 times)

PixelSteel

  • Playmaker Newbie
  • *
  • Posts: 9
Rotate Player According To Mouse Position
« on: February 09, 2018, 12:09:20 AM »
Hi! So here's my problem, I can't figure out how to rotate the player according to the mouse position. Basically, whenever the mouse goes around the player, I want the player to only rotate along the Y axis towards the mouse position.

I'm using the Simple Controller action, and I tried the smooth look at direction, no luck. Any help guys?

Thanks in advance!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Rotate Player According To Mouse Position
« Reply #1 on: February 09, 2018, 05:21:28 AM »
Hi.
Have you tried 'Mouse Look' or 'Mouse Look 2' ?

antibob

  • Playmaker Newbie
  • *
  • Posts: 24
    • BillsClass
Re: Rotate Player According To Mouse Position
« Reply #2 on: February 10, 2018, 09:54:30 PM »
Try a Mouse Pick action, store the position and use Smooth Look At to look at the stored position. Note that the mouse pick needs an object like a ground plane or other object in the background to register the position. I often store the Game Object Collider in a Mouse Pick just to help debug what is being selected.