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.

DarkBASIC Professional Discussion / whats the best 3d mouse snippet around?

Author
Message
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd Sep 2002 11:45
If any one has a snippet or theory behind moving an object in 3d relating to the mouse with a movable camera, could u post what u have so I can understnad the best process for this current problem.

I can do a fixed camera no problems but Id like to able to move it in 1-3 of the dimensions and still be able to move my object.
Kale
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: United Kingdom
Posted: 23rd Sep 2002 15:17
is there an app or game which uses the same effect, so people can understand better what you need?

What the flame does not consume, consumes the flame.
----------------------------------------------------------------
AMD XP2100+, Geforce4Ti 4400, 512Mb DDR, Abit KX7.
Zero
22
Years of Service
User Offline
Joined: 28th Aug 2002
Location: Finland
Posted: 23rd Sep 2002 17:51
Well.. uwdesign has lots of these on his homepage. Check it out.

The evil plan is now even closer!
- - - - - - - - - - - - - - - - - - - -
Specs:- P3 550 Nvidia TNT2M64, 192Mb RAM
The One Ring
21
Years of Service
User Offline
Joined: 15th Sep 2002
Location: United States
Posted: 23rd Sep 2002 18:03
There also appears to be a snippet on the Code Snippets message board here at DBPro. I only looked over it briefly, though...
Matto
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location:
Posted: 24th Sep 2002 05:07
Yes I have a theory but havn't practiced this, it's off the top of my head, I will be suprised if you havn't thought of this already, but.. :-

First set the camera to move with the mouse, x for left and right(3D x axis) and y for forwards and back (3D z axis), with the middle mouse button(4) for up and down (3D y axis), thats the 3 axis covered for the camera, of course tilt and roll are other things to bare in mind, I am presuming this is not needed.

so to move the object you can click and hold the left mouse button and while held you move the object with the mouse the same way you would with the camera, once you let go of the left mouse button (or the one assigned to the object control) the object stays in that place or does whatever you code it to do after releasing the button and you go back to the camera control.

1ghz Cel,512 sdram 133,Gf2 MX 400 64,SBL 5.1,Win98
Best Upcoming MMOG - http://WWW.Atriarch.com
Project: Card Game with No Name
Matto
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location:
Posted: 24th Sep 2002 05:09
Ops, sorry would ahve added this with an edit if there was one...


You could use the right mouse button for the movement of both the object and the camera if needed, I am sure you worked this out but thought I should add it incase not.

1ghz Cel,512 sdram 133,Gf2 MX 400 64,SBL 5.1,Win98
Best Upcoming MMOG - http://WWW.Atriarch.com
Project: Card Game with No Name
Mikko
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 25th Sep 2002 17:34
This might help

Mikko
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 25th Sep 2002 17:35
Matto
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location:
Posted: 26th Sep 2002 03:18
I tried your demo and it's all messed up, yes it loads... but when cliking an object highlighted with the mouse it grabs various cubes within a peculiar range of the mouse and drags them in to the middle of the screen willy nilly..

good idea but not quite working here..

1ghz Cel,512 sdram 133,Gf2 MX 400 64,SBL 5.1,Win98
Best Upcoming MMOG - http://WWW.Atriarch.com
Project: Card Game with No Name
Mikko
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 26th Sep 2002 15:27
Thanks for the comment. Our softwarehouse is not very succesfull as you can see.But well'be back with a better version soon.

"Ok boys, lets cancel those Hawaian tickets. Back to work"

Mikko
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 26th Sep 2002 16:19
Ok ! Thats now corrected. It takes only one click.

The demo only demonstrates how to select 3d-object with
mouse and how to grab it for taking with you(camera).

Demo itself is simple and don't have collision detection.
So objects overlap and so.

We have to make little game with those commands and give it free. Now ,that was a good idea..thanks..Seeing you at showcase section..

Login to post a reply

Server time is: 2024-09-08 03:42:52
Your offset time is: 2024-09-08 03:42:52