Hello,
Im creating a 3D world editor with Vizard. I want to add a model, place it and be able to replace the models. The user can navigate through the world with wasd and click a model and replace it. So far so good, but i'm experiencing some problems with the object placement.
This is the code for a model to follow the mouse-cursor:
Code:
# draw model on mouse position
if(self.isDrawing):
line = viz.MainWindow.screenToWorld(viz.mouse.getPosition())
x,y,z = line.endFromDistance(6)
y = 0
self.model.setPosition([x,y,z])
It works but it is still hard to navigate objects in the world. Is there a better way to let models follow the mouse and put them in the 3D world?
Thanks!