Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / 2D mouse in to 3D mouse xyz depth with ray casting a littal help needed

Author
Message
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 9th Sep 2008 20:57 Edited at: 9th Sep 2008 21:25
ok so here is my problem, I have come up with an physics object make, but at the mo Im using mousemove x & y but which moves a sphere around like a mouse pointer.

but what I won`t to do is move the mouse cursor on the x & y using ray casting to place objects

here is what Im doing with the ray cast and mouse
move the ray cast object with the mouse its a bit scetchy
hold mouse left button to rotate camera, up down or w & s keys to move camera.


here is what is going to be like as an physic object maker


Help please! any one...

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 10th Sep 2008 00:12
here is a fix I worked out, its still quite scetchy but it works better then the last post.

here it is


soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
General Reed
18
Years of Service
User Offline
Joined: 24th Feb 2006
Location:
Posted: 10th Sep 2008 20:33
Looks like u need to assign the object as "selected", and only deselect again when u lift the finger of the mouse.

CPU: AMD X2 6000+ 3.0ghz GFX: NVIDIA BFG Geforce 8800GTS 640MB OC-550mhz core RAM: 2048mb

sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 11th Sep 2008 00:44 Edited at: 11th Sep 2008 00:56
@ General Reed

Quote: "Looks like u need to assign the object as "selected", and only deselect again when u lift the finger of the mouse."


what do you meen?

are you talking about when an object is selected by the ray cast?

What Im asking is if any one knows how to make the mouse move the ray cast a bit smother.

if you look at the 1st thread of this post, and look at my 2nd code snippet, you will see what the ray cast is going to be used for.

the ray cast will replace my object maker sphere, of which uess mousemovex() & mousemovey() to move the object around.

the 2nd posts ray cast code will replace this mousemovex() & mousemovey() control over the sphere.

I hope that made some sense.

so if you know what Im talking about, please can you help me, or any one else who knows how to help me smoth this ray cast out?

I will intergrate the two codes and post them back here, and will also post them on my physic & AI challenge post.

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 14th Sep 2008 22:17
ray cast moving with the mouse cursor.

this is the oppisite direction to the mouse cursor, this moves like a dream.
if any one can help fix this smithness isshue, please help I will give credit for the work.


tryed uesing the ray cast like this and it was a lot smother moving, but is going in the oppisite direction to the mouse cursor.

here is the code with the oppisite direction ray cast, so it can be copyed and run.


can any one help with this?

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 15th Sep 2008 02:35 Edited at: 15th Sep 2008 02:39
ok I fix my proble of ray cast smothness, and have intergrated my object maker with my ray cast mouse cursor.

my next step it is object selectetion and alteration, for exarmple size and positioning, I may even make a metairal editer.

if any one has any ideas, plesae fell free to post them here.

I will give credit to ever one whos code I use.

but just as a heads up, I will be entering a small challenge with this code.

here is my updated code


thanks to every one who helped me so far.

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!

Login to post a reply

Server time is: 2024-11-24 21:30:14
Your offset time is: 2024-11-24 21:30:14