#1
|
|||
|
|||
Mapping position data to a scaled transform
I have the following problem and was wondering if there is a solution. I want to use a scaled version of a top-down map, and have all position data transformed to the scaled map. A visual representation is included in an image. The gray/green map is the scaled version of the actual 3D space, which is superimposed with transparency (delineated also with a red line).
The map has a scale factor of [1,1,1.2]. How can every position passed to the map be automatically transformed to correspond to the correct spot? I use preScale but probably in the wrong way, as it scales the original 3d node, too. I would appreciate if there is a way that does not involve multiplying every single value passed with a factor, as this would entail a considerable amount of tweaking. Thanks! |
#2
|
|||
|
|||
Take a look at the onTheFly.py tutorial script (File > Quick Open > type: onTheFly). That shows a top down map of the scene and draws the position of the viewpoint in the map.
|
#3
|
|||
|
|||
Thanks Jeff. I've seen this while trying to find a solution. However, it's an 1:1 scaling of the actual virtual world. If you notice the attached image, I want to have a different vertical scaling, translating all position data to reflect this change.
Is there a way to do this? |
#4
|
|||
|
|||
Jeff,
any updates on this? Thanks! |
#5
|
|||
|
|||
The onTheFly example script gets the view position of the bird's eye window in pixel coordinates. Those x,y,z pixel values can be multiplied by any scale factor when drawing the vertices that represent the view path. Are you also adding a bird's eye sub-window in your application?
|
#6
|
|||
|
|||
Jeff,
Sorry for my long absence, I was away for the whole August. I am using a bird's eye sub-window indeed. I followed your solution of multiplying each x,y,z position value that appears on the map with the scale factor. I was just asking if there is a more "automated" way to make this work, instead of having to apply the factor on every call of things (quads) appearing on the map. Probably not? |
#7
|
|||
|
|||
You could try applying a scale factor to the on-the-fly node instead of each vertex that's added.
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing parent without changing absolute global position? | The SundanceKid | Vizard | 2 | 05-23-2014 02:43 PM |
Use saved text file data as replay sources problem | mizutani_jun | Vizard | 4 | 10-14-2010 04:49 PM |
writing joystick position to a data file | Saz | Vizard | 3 | 12-17-2008 05:18 AM |
Get position data in an own little program | Researcher | Precision Position Tracker (PPT) | 2 | 02-01-2006 02:55 AM |
tracking using quaternarion data | jfreeman | Vizard | 2 | 06-01-2005 08:48 AM |