Profile image

Coordinate based FT AI

102k winterro  yesterday

So i have figured out everything exept the steering. I mean everything

I have tried using

Latitude, Longitude , lat(target), long(target) to find the angle(aim) and heading.

It always ends up ocilating on the longitude line for some reason.

but clearly this isn't working, cause it doesn't work. how would you do it, and if possible as barebones as possible, as this caveman just spent 4 hours grinding himself into a wall, going nowhere.

  • Log in to leave a comment
  • Profile image
    102k winterro

    @KSB24 yeah, i have used that. I tried using a different code cause it couldn't stop it from ocolating on a single line in incremental of 22.5 degrees

    Turning it away from the target point broke everything.

    12 hours ago
  • Profile image
    147k KSB24

    Have you considered using "atan2"? Not gonna lie, this function helped me alot for doing the exact same thing as aim you're trying to do right now.

    17 hours ago
  • Profile image
    102k winterro

    @KSB24 You have been doing this for a lot longer than me, is it possible if you could help lend me a hand?

    If yes, how would i go about creating just a very simple variant of this?

    I have tried using both sinus and tan, to use latitude and longitude as one big triangle and getting the angle from that, but that clearly doesn't work. The best thing i got is an annoying code that only works going away from the target and inverts when trying to get closer. swapping lat and long didn't help.

    It is a mess cause of all the drama, but its here if you wanna take a look at it, cause i really cannot find a sollution for the steering issue.

    +1 23 hours ago