PDA

View Full Version : Manipulating 3D Models


Plasma
02-22-2004, 10:33 AM
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:
model = viz.add('model.wrl')

#Make model invisible
model.visible(0)

#Make model visible
model.visible(1)
Hope that helps.