PDA

View Full Version : Question: Detect change within a scene


BSUGeek
10-01-2014, 08:10 AM
Is it possible to detect when something changes within a scene? for example if your in the gallery environment and the viewpoint is pointed at the starry night picture could you receive a detection message on when an avatar walks into your viewpoint?

Help would be greatly appreciated.

chris2307
10-01-2014, 10:04 AM
Can you check if the avatar is visible using the <window>.isCulled() function? This function takes in the name of the object and returns whether it is culled from the current viewing frustum. If the function returns 0, it's not culled so is visible. So maybe try this:


avatar = viz.addAvatar('AvatarYouAreUsing')
if(viz.MainWindow.isCulled(avatar) == 0):
// Avatar is visible

Jeff
10-01-2014, 11:45 AM
The vizproximity (http://docs.worldviz.com/vizard/#vizproximity.htm) library is useful for detecting proximity between objects.