WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 04-20-2017, 02:28 PM
haohaoxuexi1 haohaoxuexi1 is offline
Member
 
Join Date: Sep 2015
Posts: 81
I made a simple code to explain my problem
Code:
import viz
import vizshape

viz.go()
grid = vizshape.addGrid()
viz.MainView.setPosition(0,1,-5)

#now the sphere should be around 7 meters away from the main
s = vizshape.addSphere(radius=0.1)
s.setPosition([0,0,2])
I added a sphere to the scene and the scene is around 7 meters in front of the mainview.

I want to achieve that when the position of mainview moved, the sphere can move to the relative position (which is around 7 meters in front of the mainview) (defining a function to achieve it). And I also need to know the current global position of the sphere.

Hopefully, you can understand what I want to achieve. I think it is regarding coordinate transformation.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Local coordinate and global coordinate haohaoxuexi1 Vizard 2 07-24-2016 07:21 PM
Problems with using WIRKS without the Kinect in a mirror setting Jennifer Vizard 0 06-03-2013 03:17 PM
Kinect auto selection of skeleton victorqx Vizard 0 05-29-2012 08:30 AM
Mouse 2D coordinate to viz world 3D coordinate james007 Vizard 1 10-08-2009 12:11 PM
creating multiple coordinate systems and making them visible jalvarez Vizard 1 02-27-2009 12:36 PM


All times are GMT -7. The time now is 10:49 AM.


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