WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-22-2004, 10:33 AM
Plasma Plasma is offline
Member
 
Join Date: Jan 2004
Posts: 22
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!
Reply With Quote
  #2  
Old 02-23-2004, 09:47 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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


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


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