how to rotate a square accordingly to the mouse x and y?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
how to rotate a square accordingly to the mouse x and y?
So i have this square and i want to rotate it, so that it faces the mouse position, but im not sure how to do it. I have gotten the mouse x and y already.
Re: how to rotate a square accordingly to the mouse x and y?
Code: Select all
local angle = math.atan2(y, x)
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Who is online
Users browsing this forum: No registered users and 4 guests