But I think a PickRay is limited for that purpose. In most cases you won't find objects like fences with it when it picks the holes in such an object and therefore doesn't detects it.
On Tue, 24 Feb 2004 13:57:19 +0100, Nikolai V. Chr. <[EMAIL PROTECTED]> wrote:
Flavius wrote:
HEre's my problem...I use a cylinder to pick infront of the camera. Not in all directions, only in the direction teh camera is currently moving.
Anyway, I have to have the radius of the cylinder veeeery large..almost 2 meters...or was it the diameter?? Doesn't really matter. The thing why I have to do this, is because if I walk towards a wall at an angle...say I'm walking towards a corner where two walls meet, then if the cylinder isn't wide enough, I can see through the walls at my sides.
I've tried shrinking the field of view, but that doesn't really seem to do it, since I have to make it reeeaally small, and it looks very wierd then.
Any ideas how to solve this?? How to change the camera or the viewplatform in some way to not allow this to happen? Maybe the clipplane or something?
You dont want the camera to collide with the pyramid defined by the front clipplane as the bottom and the eye point as the peak, therefore simply do not allow the camera to move that close to geometry. I do a simplified approach to this: I pick forward with a ray and dont allow movement to get closer to geometry than the frontclipdistance+ the distance from the camera origin to the camara most front extruding part. Works in most cases, unless you move backwards into a wall with an angle. Also not so good if the angle of the wall you are walking towards is very high.
---------------------------------------------- Nikolai V. Christensen, Computer Engineer, Simulation and Training department IFAD, Forskerparken 10A, DK-5230 Odense M Denmark, EU Phone: +45 63 15 71 31 Fax: +45 65 93 29 99 WWWeb: http://www.ifad.dk e-mail: [EMAIL PROTECTED] ----------------------------------------------
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
-- -- http://www.3dchat.org - Welcome To The Unreal World http://java3d.virtualworlds.de - The J3D Developers Ressource
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
