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
  Formula for converting angle to vector? komirad 2 14,576 Jul 29, 2011 07:29 AM
Last Post: ThemsAllTook
  Local (X, Y) Coordinates from 3D plane coordinates merrill541 5 12,118 Jun 29, 2009 01:32 AM
Last Post: RhinosoRoss
  converting graphics to tile coords Leroy 0 2,739 Jun 12, 2007 02:55 PM
Last Post: Leroy
  Translate mouse coordinates to world coordinates nalenb 4 12,662 Mar 21, 2006 11:59 PM
Last Post: glMatt
  Converting (x, y) into NESW direction unknown 19 15,380 Nov 2, 2005 09:52 AM
Last Post: Zekaric