The workaround was to rotate the character additional e.g. 90° but if I do that the character starts spinning (since I’m adding the rotation in the physic_process - exactly where the rotation is calculated as well).
Thanks for your answers. Sry if I’m overlooking something obvious
Edit: I managed to fix the tank canon rotation (I’ve applied an additional rotation into the tween node call - since I’m interpolating it’s rotation). But the question remains: what’s the best way of fixing the rotation using “look_at(point)”?
So I would need to see your assets and scene structure to be sure, but is the problem just the orientation of the sprite? If you sprite is 90 degrees off, then that would be the source of your problem. look_at should align the sprite to the positive horizontal axis.
In other words, if you replace the godot head with an arrow that points from left to right, is it still 90 degrees off?
Also, if you don’t make some rules for deadzones etc, you are going to have some real trouble.
I have the exact same problem, https://i.imgur.com/rjuDC18.png . Both look at and setting rotation degrees results in my object using the wrong “face”. Adding 90 deg seems to solve the problem at the moment. I’ve not change any default settings of any objects except scale.
arcadeoid | 2019-05-01 16:51
Your asset is 90 degrees off. The green triangle should point right not up.
iron_weasel | 2019-05-01 17:33
You are right. I just figured it out a second ago.
I’ve already fix the sprite rotation (towards the mouse) by defining a deadzone around the sprite (since the object is spinning if there is no point to rotate to - meaning only the “rotate(radians)” is processed) - I’ve just realized that recently after debugging.
I fixed the tank canon issue by adding an additional 90° turn in the interpolation method call (but it could be fixed by defining a deadzone as well).
Damn! I’ve been to focused on whether look_at(Vector2 point) is bugged or not, I didn’t even consider these relatively easy workarounds or how to work with this method. Valuable lessons have been learned, thank you very much mate & cheers!