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 / Diablo-like game...(engine) need help with 3d mouse coordinates

Author
Message
geomancer12 xD
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 5th Mar 2009 11:31
I'm trying to design some kind of diablo-like engine, but i have one problem. How do i transform mouse position in 3d, so my character can move to mouse position? I attached the example to this post, feel free to download and edit it. Please try to modify it so that 3d mouse movement works...

EDIT: I think there's something wrong with the movement i created. Try to load a 3d model. When it's supposed to move (dbPlayObject) it stays on place... Try to fix that too. And just one question : when i try to load a 3d model that has...hmm...it's not high poly, but some kind of low poly. Game freezes at the loading of model. Why is this happening? Can i fix this without modifying the source of Dark GDK?

Attachments

Login to view attachments
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 1st Apr 2009 05:54
In DBPro, I used the "pick screen" command, that way I could obtain the absolute 3d coordinates using only the mouse coordinates.
You could also use pick object, it will give you the relative coordinates of the object.


Warspawn
19
Years of Service
User Offline
Joined: 6th Apr 2005
Location: Arizona
Posted: 2nd Apr 2009 23:01
you can try this, the TargetObjectID would be for like a movement target or just a simple cube. the code should place the cube in the correct area. then you could have your player object always point and move towards the movement target, if the position of the movement target was equal to the player position then it doesn't have to move.



-Warspawn
nutcaserunner
15
Years of Service
User Offline
Joined: 2nd Apr 2009
Location:
Posted: 3rd Apr 2009 01:12
Wow.. i just spent 2 hrs yesterday trying to figure the same thing out. Finding this made my day.

Login to post a reply

Server time is: 2024-09-30 21:26:48
Your offset time is: 2024-09-30 21:26:48