reseting an object
Hello,
I am trying to reset an object. Right now when my sensor passes over and object and then sets the position to to -10 on the y axis. What I want to do is when my sensor leaves that object how do I reset that particular object to 0 on the y - axis. I have my objects arranged in an array which lays the objects out on the x and z -axis flat on the y -axis. The array is 4 x 5. Thanks for any help |
Are you using viz.intersect to see whether or not the sensor is over the block?
You can continue to us viz.intersect to see whether or not the line drawn from below the sensor is still intersecting the block. If it is you don't need to do anything since the block has already been moved down. If it's not intersecting that object anymore the sensor has moved beyond it and you can reset the object's position. if you're still using the vizintersect code from the other thread you started than you could change it to something like this. Code:
currentBlock = None |
Still not working... Below is the code I have created for it. Im thinking it has something to do with the array. Just getting confused with it.
Code:
import viz |
I think an intersection occurs with the ground and that interferes with code to move the pillars. Try disabling intersection on the ground
Code:
ground.disable(viz.INTERSECTION) |
All times are GMT -7. The time now is 11:49 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC