Petr Schreiber
10-03-2007, 10:59
Hi guys,
just reporting I found one interesting feature which could come handy for next TBGL.
It is determining world x,y,z position from mouse x and y.
As you possibly know, I now try to do some simulation environment for robot on university. And as the robot can't see and just shoots rays around to get nearest obstacles, I used this kind of stuff. Nice thing is you must not pass whole geometry to some collision routine, it is something like just request to Z-buffer.
This function could be handy for some collisions and similar stuff, it is just few OpenGL commands I would translate in one.
I have attached 3 second video :) showing how it works. I get coordinate from center of screen and I put sphere on obtained x,y,z position.
Hope to deliver you "live script" soon :)
Bye,
Petr
just reporting I found one interesting feature which could come handy for next TBGL.
It is determining world x,y,z position from mouse x and y.
As you possibly know, I now try to do some simulation environment for robot on university. And as the robot can't see and just shoots rays around to get nearest obstacles, I used this kind of stuff. Nice thing is you must not pass whole geometry to some collision routine, it is something like just request to Z-buffer.
This function could be handy for some collisions and similar stuff, it is just few OpenGL commands I would translate in one.
I have attached 3 second video :) showing how it works. I get coordinate from center of screen and I put sphere on obtained x,y,z position.
Hope to deliver you "live script" soon :)
Bye,
Petr