Bug Report/fault: Arc tangent not working when something sets position to object SOLVED, Unusual alter in code


It's just an annoying bug.

I was using arctan: one block facing the other

The block that used arctan (which was facing the other one) has a text set to its position, repeated forever.

Arctan doesn't work from this :rage:

By the way, does anyone know how to use arctan so that the object facing another doesn't angle to it, the only angle reference is when it moves forward, it moves in the direction of the object it is "facing"?


@ThinBuffalo, do you know?


Sure, I can think of 2 ways off the top of my head

  1. Just don't set the object's Angle the calculated angle. Set another reference angle instead. Let's call it theta. Then you use Set Position and calculate the new position using Cos/Sin and theta.

  2. If you need or would rather use Set Angle and Move Forward, use 2 objects, one of which is invisible. Use the invisible object with the Set Angle & Move Forward. Continually set the visible object's position to the invisible object's position. Sounds like this is what you were trying to do?


That is what I just did, and the whole bug report is about this: when the visible object sets position to the invisible, the invisible object's angle no longer works.

I'll give option 1 a shot though.


Can you post a project link? It's sorta sounds like a bug in your code rather than a Hopscotch bug, but I'd be happy to check.

I suggest to recategorize this as Debug My Code until others confirm which case it is.



There was a bug in my code, but I don't think I altered it myself. The arctan positions were set to the wrong text, but as I exited the project it might've somewhat changed code. I'm pretty sure that I didn't select the wrong text X and y positions

I did shuffle and rename some texts, and this may have glitched the system changing text references.

Sorry for the inconvenience.


Adding onto that i have an extremely slow editor so I was copying and pasting blocks that were nearly duplicates and it could've changed through that.


Glad you found the bug :smiley: