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.

Newcomers DBPro Corner / Following the cursor

Author
Message
NickH
16
Years of Service
User Offline
Joined: 19th May 2008
Location: Nova Prospekt, North Yorks, UK
Posted: 11th Oct 2008 18:30
Hello people. I'm sitting down to have a play with DarkBASIC again. Does anyone know how to get an object to turn to follow the cursor. All of this is from a kind of top view, so its 3D graphics for a 2D game really. I've seen commands which I'm pretty sure would do it, but I can never seem to get them to do what I want. I won't post any code...as I don't have any anymore.

Thanks for any help
Nick
spiret
16
Years of Service
User Offline
Joined: 4th Oct 2008
Location: Celestia
Posted: 11th Oct 2008 22:56
Hi, there! I think I know what you mean. Try this:


That should do it. Of course, you can substitute any screen coordinates for the mouse cursor, but you get the idea.

On a side note, my brother is a NickH. Quite a co-inky-dink!

Problem is solved!
NickH
16
Years of Service
User Offline
Joined: 19th May 2008
Location: Nova Prospekt, North Yorks, UK
Posted: 16th Oct 2008 20:48
Thanks for that. I'll give it a try later, though I've decided to do other joystick control method first, to see if it's more fun. I've now got a new problem, which I'll post in a new thread. Nothing to do with this code as I haven't used it yet.

2 NickHs in the same universe? Must be against the lays of physics surely!
Captain IceT
16
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Boat Murdered, and Im still laughing!
Posted: 28th Oct 2008 08:41
Someone else had a similar question and I posted some code there that seems to work pretty well.

As for two NickHs in the same universe, well all I can say is "There can only be One!"

"Dwarf Fortress has taught me that all the world's problems would be substantially reduced had our parent civilizations never minted more than four stacks of coins."
- DwarfFortressWiki
NickH
16
Years of Service
User Offline
Joined: 19th May 2008
Location: Nova Prospekt, North Yorks, UK
Posted: 5th Nov 2008 22:38
Thanks El Capitan. I tried to search this out before asking, but it can be quite hard to find exactly what you're looking for at times.

Exactly there can only be one me. I'm ME!

Login to post a reply

Server time is: 2024-11-25 16:35:55
Your offset time is: 2024-11-25 16:35:55