Converting Local to World Coordinates

Posts: 61
Joined: 2007.01
Post: #1

I'm trying to work out how to convert a set of local coordinates to world coordinates for a wandering steering behaviour and wanted to check here first to make sure I have the theory correct.

I'm working in 3D but I'm constraining movement to x and z (there's no y i.e. no UP).

What I'm aiming to do, according to Craig Reynold's method is to constrain the movement to a wandering "circle" which is defined around the agent's position

This is how I reckon the local to world transformation should go:
1. Create a rotation matrix using the agent's heading vector and a perpendicular side vector, multiply by the agent's current matrix. (If I was to have full 3D wandering I presume I'd need to include an Up vector too)

2. Translate the wandering target vector by the agent's matrix created in 1.

Does that sound correct?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Local (X, Y) Coordinates from 3D plane coordinates merrill541 5 7,000 Jun 29, 2009 01:32 AM
Last Post: RhinosoRoss
  Translate mouse coordinates to world coordinates nalenb 4 6,516 Mar 21, 2006 11:59 PM
Last Post: glMatt
  Converting (x, y) into NESW direction unknown 19 10,449 Nov 2, 2005 09:52 AM
Last Post: Zekaric
  Converting Int To String Nick 4 14,209 Jun 2, 2005 02:13 AM
Last Post: hangt5
  converting xyz rotation to something else reubert 10 5,942 Mar 5, 2005 07:33 PM
Last Post: Puzzler183