WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Question: Detect change within a scene (https://forum.worldviz.com/showthread.php?t=5173)

BSUGeek 10-01-2014 08:10 AM

Question: Detect change within a scene
 
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 .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:

Code:

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


Jeff 10-01-2014 11:45 AM

The vizproximity library is useful for detecting proximity between objects.


All times are GMT -7. The time now is 06:22 AM.

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