[SOLVED!] I am working on a aim thingy, but something is wrong

Fill this out this info to make it easier for the community to help you! If you don’t fill out this information, your post may be deleted or removed.

What Wick Editor Version are you using?
1.19.3

Describe the Problem
I saw a old topic, and I saw @zrispo used this “this.pointTo” function but nothing worked
What have you tried so far?
Tried to go to the latest posts in that topic, but it kinda worked, just the rotation is broken.

Do you have a Wick Editor File that we can see? Optional*
No?

Note: I did see that pointTo did not worked by someone else, but instead I just wanted to ask why it was removed. Here is the topic Make Object Point towards Cursor

That function is probably only in the legacy editor

You can use Math.atan2 to make an object point towards a position. @Revon gave a solution:

image

The transparent thing is my cursor, and the gun is the object to look at my mouse.

probably the character drawing is rotated 90 or 270 degrees relative to the character’s actual rotation

@Nick helped me with this before, and he shared a Wick file here:

Hopefully that helps

Oh! I get why.

So the object’s rotation (actual rotation) has to be up like the
image
arrow thing

It works now! Thanks @Hamzah_Alani and @pumpkinhead

1 Like

more like it is expected that 0 degrees is up. if the rotation is 90 degrees and it points up, the editor becomes “too smart” and takes the rotation as 90, not 0.