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 Discussion / Blast it all! How does one move an object with the mouse real-time?

Author
Message
PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 14th Oct 2003 04:30
Umm... what the title said...

It's for my project. You might have come across some of my other threads. I plan on making the active object moveable with the mouse, but, for the life of me, I can't getting it to work. Probably something so simple it's evading me. That happens sometimes...

As always, I'll give credit in my program if you can help. Thanks.

Destroy you with my mind, I could!
. Cool, he is. Play his games, I do.
PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 14th Oct 2003 05:07
Alright... let me explain further...

How do you get the object to move with the mouse, while the mouse is clicked, exactly where the mouse moves to.

Destroy you with my mind, I could!
. Cool, he is. Play his games, I do.
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 14th Oct 2003 05:26
you mean grabbing a object liek a sphere and moving it with the mosue sort of the same way you click and drag stuff is that what you mean?

http://www.freewebs.com/ingamers
PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 14th Oct 2003 05:50
YES!! That's exactly the effect I'm going for! I couldn't get it to work. I had to implement movement with the arrow keys, and it just plan sucks...

Destroy you with my mind, I could!
. Cool, he is. Play his games, I do.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 14th Oct 2003 06:37
change the way to speak about your problem if you want to more help regarding it. Its clear to many users that your not really trying to apply yourself and people dont usually dump it on your plate all nice and neat for you.

If your refering to a 3d environment where u can move the camera around at any angle whilst also being able to click on an object and drag it around then look into the code snippets board or the code references. there have been many methods for this posted before hand.

The easiest method if your just starting is to limit the camera from rotating or moving and creating another object to provide the collision with.

mouse x() and mouse y() would be updated with this mousecubes location and if its collides with the 2nd cube or object then the 2nd object or cube is updated in position with the mouse cube.



"this sux and that sux " attitude wont get you far at all.

PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 14th Oct 2003 06:49
Eh... *looks at ground, kicks dirt, ashamed* sorry indi...

I was kinda rushed at the time. Don't recall why...

Anyways, I'll check out the code snippets board. Thanks...

Destroy you with my mind, I could!
. Cool, he is. Play his games, I do.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 14th Oct 2003 10:35
dont sweat it mate, hold that head up high we all make mistakes including me

Login to post a reply

Server time is: 2025-05-21 14:50:21
Your offset time is: 2025-05-21 14:50:21