Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: colpolstudios on June 28, 2021, 07:00:54 PM

Title: rotate a 2d sprite based on the mouse x screen.x position issue [Solved]
Post by: colpolstudios on June 28, 2021, 07:00:54 PM
My screen is set up 1080 x 1920.

Planned mobile android development.

currently, I am using get mouse X, normalized every frame. stored as X

Screen to world point uses this X within the screen x and store in "world X", every frame.

Set property local rotation.z to the "world X". every frame.

However, after a few seconds, and moving the mouse, my sprite no longer rotates despite the variable clearly showing that the input is changing. The whole system stops after a few seconds always at -180 for the sprite.

It's like the sprite has got locked out of its movement and can not do anymore.

Could you possibly help me fix this issue?



 


 

Title: Re: rotate a 2d sprite based on the mouse x screen.x position issue
Post by: djaydino on June 29, 2021, 07:34:06 AM
Hi.
Maybe make a short video to show your setup.
Title: Re: rotate a 2d sprite based on the mouse x screen.x position issue
Post by: colpolstudios on June 29, 2021, 05:46:42 PM
I have changed my setup. with the initial issue resolved thank you for your reply.