Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6194081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:14:06+00:00 2026-05-24T03:14:06+00:00

I am trying to implement obstacle avoidance behavior from the paper steering behaviours for

  • 0

I am trying to implement obstacle avoidance behavior from the paper steering behaviours for autonomous agents. What I am stuck at is how do i convert global coordinates (2d) to local coordinates for my character?

Basically Say I am at 1,0 and the enemy is 10,0. I would like to move the origin to 1,0 so I get 9,0 as the enemy coordinates.

What I ended up doing,

to translate to local,


[1 0 -tx]   [x]
[0 1 -ty] x [y]
[0 0  1]    [1]

then back to global using,


[1 0 tx]   [x]
[0 1 ty] x [y]
[0 0 1]    [1]

tx,ty is the local char coords and x,y is the enemy char coords.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:14:07+00:00Added an answer on May 24, 2026 at 3:14 am

    Just subtract the points.

    Relative = Position – moved axis point.

    (10,0) – (1,0) = (9,0)

    Displacement

    Edit:

    Using an Affine transformation to convert the entire x,y plane:

    Just for numeric issues, lets choose another perspective point: (3,7)

    [x] = [ 1 0 -3 ] = [x`] = x -3
    [y]   [ 0 1 -7 ] = [y`] = y -7
    [1]   [ 0 0 1  ] = [1 ] = we don't care
    

    Transformation matrix

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am trying to implement a generic way for reading sections from a config file.
Trying to implement the decorator pattern in C# from the code in the Head
I am trying implement Unblock me Puzzle. i want to change image position from
Trying to implement the following structure from c to use NSArray in objective-c: In
trying to implement a multiplayer. Using the sample from Game Center - Sending and
Trying to implement the example from here. Facebook Share passes along the URL of
Trying to implement the new FP 10.1 Global error handler into my projects but
Trying to implement, in Scala, the following Haskell function (from Learn You a Haskell...)
Trying to implement the following behavior on an iPad. I have a map-centric application
All I am currently trying implement something along the lines of dim l_stuff as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.