3D Mouse Implementation

by DevonX

Posted on April 15, 2007 at 4:36 PM

Alright. This example shows how your can find 3D coordinates depending on where the camera is pointed to. It basically "shoots a ray" as far as it can go without hitting anything. After that is done, the coordinates of the endpoint is where in 3D you are looking. I have included both the example, and a quick use of it where you click to move (in 3D). I can think of many uses of this, and I'm sure you can too.

DarkSoulcalibur commented April 15, 2007 at 5:41 PM
this is quite... interesting... doesn't move to smoothly... although it looks kinda cool. so... em...7/10
knighty commented April 15, 2007 at 6:02 PM
WaleedAmer commented April 15, 2007 at 6:40 PM
You impress me. =)
Coffee commented April 15, 2007 at 10:54 PM

This could be helpful for a few people I think.
Izzet commented April 16, 2007 at 11:05 AM
could you do an rts selection (rectangle) example using this? I tried with another example.... and failed miserably.
abacus commented April 16, 2007 at 11:26 AM
the title of this example is misleading; the example doesnt actually use 3d mouse, but rather is a bullet-floor detection system Fairly nice. though it doesnt match up with Mechanikos's example on Yourself's mouse scripts.
DevonX commented April 16, 2007 at 1:06 PM
I'm going to modify this soon so that instead of flat floors, it will work on bumpy terrain too.
Crazy Star commented April 16, 2007 at 2:21 PM
Not very precise nor very fast. Needs polish. But good =)
Dragonos commented April 17, 2007 at 1:56 AM
not so bad handy for 3d.