![]() |
|
#2
|
|||
|
|||
|
try using the viz.screentoworld function to get a line that you can use to call viz.intersect. This code should let you know if the pointer is in line with an object
Code:
def FireLine(): line = viz.screentoworld(pointer.getPosition()) dir = viz.Vector(line.dir) dir.setLength(200) begin = line.begin end = line.begin + dir info = viz.intersect(begin,end) if info.valid: print "intersected" vizact.onsensordown(wiimote,wii.BUTTON_B,FireLine) |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strange Wii Mote error... | shivanangel | Vizard | 8 | 02-18-2009 12:32 PM |
| vizinfo + wiimote ? | djdesmangles | Vizard | 6 | 10-22-2008 02:18 PM |
| Sending sound to Wiimote ? | djdesmangles | Vizard | 1 | 07-31-2008 11:26 AM |
| wiimote and sensor bar | masaki | Vizard | 1 | 03-06-2008 03:07 PM |