#3
|
|||
|
|||
Instead of this:
Code:
for pos in box_pos: if box_pos [0]== 3.0 and pos[1] == 4.0 and pos[2] == -5.0: print box_pos, 'The Box is connected properly move to next connection' Code:
if box_pos[0] == 3.0 and box_pos[1] == 4.0 and box_pos[2] == -5.0: print box_pos, 'The Box is connected properly move to next connection' You may also want to compare positions approximately (i.e. "abs(box_pos[0] - 3.0) < 1e-3") to avoid any problems with rounding error. |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to render a texture of the transparent object and then blur it | whj | Vizard | 1 | 09-25-2012 03:15 PM |
how to hide 3D virtual object behind real object? | Darkmax | Vizard | 3 | 05-29-2012 09:39 AM |
retrieve Object names | Geoffrey | Vizard | 11 | 12-11-2009 04:26 AM |
Making an object to appear after other object done animating | jaylocco | Vizard | 2 | 07-13-2009 06:17 PM |
rotate to object | jargon | Vizard | 1 | 08-08-2005 12:20 PM |