View Single Post
Old 04-20-2017, 02:28 PM
haohaoxuexi1 haohaoxuexi1 is offline
Join Date: Sep 2015
Posts: 81
I made a simple code to explain my problem
import viz
import vizshape

grid = vizshape.addGrid()

#now the sphere should be around 7 meters away from the main
s = vizshape.addSphere(radius=0.1)
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