WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Manipulating 3D Models (https://forum.worldviz.com/showthread.php?t=123)

Plasma 02-22-2004 10:33 AM

Manipulating 3D Models
 
This seems like a really basic, obvious thing but for some reason I can't get it to work.

I'm trying to create a game, of sorts, where the user finds targets numbered 1 through 6 one at a time on the walls of the environment. When the user finds one, I want them to be able to pull the trigger on the joystick and have it disappear. Then I want them to return to a home position, pull the trigger again and have it reappear on the wall at the home location.

It would seem that the simplest way to do this is to have the target become invisible when the user pulls the trigger, and have another target at the home position, formerly invisible, become visible when the user pulls the trigger again, but I can't figure out how to do this.

Thanks so much!

farshizzo 02-23-2004 09:47 AM

Hi,

To make an object visible or invisible use the visible command. For example:
Code:

model = viz.add('model.wrl')

#Make model invisible
model.visible(0)

#Make model visible
model.visible(1)

Hope that helps.


All times are GMT -7. The time now is 11:19 AM.

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