Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: PixelSteel on February 09, 2018, 12:09:20 AM

Title: Rotate Player According To Mouse Position
Post by: PixelSteel 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!
Title: Re: Rotate Player According To Mouse Position
Post by: djaydino on February 09, 2018, 05:21:28 AM
Hi.
Have you tried 'Mouse Look' or 'Mouse Look 2' ?
Title: Re: Rotate Player According To Mouse Position
Post by: antibob 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.