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 GDK / Mouse Move 3D Object Problem.

Author
Message
Novice
14
Years of Service
User Offline
Joined: 3rd Oct 2009
Location:
Posted: 4th Oct 2009 03:23
I can move the object accurately when the camera is pointed straight down. The problem im having is moving the object when the camera is at an angle.

Here is the code:


Any help would be greatly appreciated!
Paynterboi TicTacToe
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location: That one place
Posted: 4th Oct 2009 04:53
What is correctly when the camera is at an angle? do you want the cube to move to the x/y/z that the mouse is pointed at one a plane?

That is confuseing so let me explain..

You have a set plane at 0/0/0 stretching from 100/0/0 to 100/0/100

do you want the mouse to move it along the plane without changeing the y, or do you want the mouse move the object along the x and y coords of the screen at all times ( without altering the z ) or do you want to be able to move it freely in 3d space at all times no matter where the camera is?

EYE R T3H +ick +ack +oe mester
Novice
14
Years of Service
User Offline
Joined: 3rd Oct 2009
Location:
Posted: 4th Oct 2009 04:55
I want to move the object along the plane.
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 4th Oct 2009 11:15 Edited at: 4th Oct 2009 11:17
Is the following code what you are looking for?

Novice
14
Years of Service
User Offline
Joined: 3rd Oct 2009
Location:
Posted: 26th Oct 2009 09:07 Edited at: 17th Nov 2009 06:13
I found some code to make it work.
Now I can select an object and move it with the camera at any angle and anywhere on the plain.
I'm trying to make a strategy game, kind of like Command and Conquer or Warcraft3.

Here is the code:

Login to post a reply

Server time is: 2024-10-01 14:30:23
Your offset time is: 2024-10-01 14:30:23