Converting Local to World Coordinates

Member
Posts: 61
Joined: 2007.01
Post: #1
Hi,

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 http://www.red3d.com/cwr/steer/Wander.html

This is how I reckon the local to world transformation should go:
Code:
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,269 Jun 29, 2009 01:32 AM
Last Post: RhinosoRoss
  Translate mouse coordinates to world coordinates nalenb 4 6,895 Mar 21, 2006 11:59 PM
Last Post: glMatt
  Converting (x, y) into NESW direction unknown 19 10,647 Nov 2, 2005 09:52 AM
Last Post: Zekaric
  Converting Int To String Nick 4 14,382 Jun 2, 2005 02:13 AM
Last Post: hangt5
  converting xyz rotation to something else reubert 10 6,077 Mar 5, 2005 07:33 PM
Last Post: Puzzler183