WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Proximity Help (https://forum.worldviz.com/showthread.php?t=5527)

michael117s 10-21-2015 06:10 AM

Proximity Help
 
Hi all!

I am having trouble with the proximity script. I have two objects,a shelf and a CD. I would like to place the CD on the shelf in a particular position on the shelf. I have placed a sensor on the shelf and made the CD a target using:

viz.proximity.Target(CD)

When I pick up the CD and move it within the bounding sensor that surrounds the shelf, I would like the CD to automatically move to a set position. So far I have used this:
def EnterProximity(e):
Disc1.setPosition([0,0.9,0])
I expected this to do the job but was unsuccessful. I would greatly appreciate help with this!

Thanks!!:)

Jeff 10-22-2015 04:10 PM

Are you sure the sensor area is setup correctly and the target is activating the sensor? You can enable debug mode to visualize the sensor area:

Code:

manager.setDebug(viz.ON)


All times are GMT -7. The time now is 09:25 PM.

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