WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 08-13-2006, 05:58 AM
k_iwan k_iwan is offline
Member
 
Join Date: May 2006
Posts: 115
It doesn't work?

Hi,

I created a small scene with boxes as control pounts the name os the boxes are layera1 ... layera17. I did implement you code snippet given earlier and apparently for some reason it couldn't find the object(boxes).
When I printed out controlPointList it gave me only [].

I don't think it is necessary to name object layera1 as 'layera'1 in blender?

I attached the vizard file for anyone who wants to have a go at it. Use Mouse to look around and up/down key to accelerate or moving back.

I will have another go and will try a different approach. I will try to find the unit relation between blender and vizard; eg. 1unit blender = 1unit Vizard, then find all the location manually. Then perhaps, for the control point do something like

cp1 = viz.addControlPoint()
cp1.translate(value x1 * scalingRatio, value y1 * scalingRatio,value z1 * scalingRatio)
cp1.translatemode(viz.LINEAR)
...
cp17 = viz.addControlPoint()
cp17.translate(value x17 * scalingRatio, value y17 * scalingRatio,value z17 * scalingRatio)
cp17.translatemode(viz.LINEAR)

Usually I always scale up my scene 10 times bigger, so by having scalingRatio = 10, it would change the position of the control points as well.
Attached Files
File Type: zip traffic_demo.zip (129.7 KB, 2603 views)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:55 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC