WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-21-2007, 09:18 AM
krimble krimble is offline
Member
 
Join Date: Nov 2006
Location: Nijmegen
Posts: 63
rotation problem

Hi all,

I have a problem with ive\osg, obj, wrl objects, The pivotpoint in 3ds max is at the edge of the object.
The object is not in the center of the world. When I export the object, Vizard imports it exactly at the right place
(the same place as in 3ds max), that's great!. But when I apply the following action.

opendoor = vizact.spin(0,1,0, 20, 5)
furniture_objects[key].addAction(opendoor)

The animation starts, but the pivot is at the 0,0,0 position of the world....

With furniture_objects[key].center(2,0,0) it seems moving the whole object to (2,0,0) ?


How do I get the right rotationPoint for a object in Vizard ?


Thank u,
Reply With Quote
  #2  
Old 11-21-2007, 10:22 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The center() command should not be moving the object. It simply sets the rotation pivot point. Are you sure you are setting the center to the correct location? Here is an example that uses the cone model that comes with Vizard.
Code:
import viz
viz.go()

#Setup environment
viz.add('tut_ground.wrl')
viz.clearcolor(viz.SKYBLUE)
viz.move(0,0,-20)

#Spin cone
cone = viz.add('tut_cone.wrl')
cone.addAction(vizact.spin(0,1,0,90))
Since the cone if offset 8 meters from the origin it will spin around the origin. Now add the following code to the script:
Code:
cone.center(0,0,8)
Now the center is placed at the cones location, so it will spin around its local origin.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
5DT Data Glove 5 Ultra Problem bjgold Vizard 1 08-08-2006 04:08 PM
problem with female animations vmonkey Vizard 1 10-07-2005 10:36 AM
sound problem alaa Vizard 7 09-02-2005 01:13 PM
PROBLEM: Picture-in-Picture breaks textures?!? vcarlson Vizard 4 10-05-2004 04:22 PM
getting absolute rotation tavaksai Vizard 1 08-03-2004 01:40 PM


All times are GMT -7. The time now is 06:48 AM.


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