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 / Maintaining a Heading.

Author
Message
mikewhl
14
Years of Service
User Offline
Joined: 19th Jul 2010
Location: Columbus,Ohio
Posted: 4th Sep 2010 20:04 Edited at: 4th Sep 2010 22:19
Hi all,
I am using a function like this:



If I am turning my ship like this:


It will turn a long as I hold the mouse.

If I move my ship with this:

I will turn towards the "mouse object", and continue to point at the mouse object (if you have some speed to your ship, it will orbit the mouse object).

My qusetion is, How do I use the "hasturned" variable (returned by the function) to exit the function and maintain the current direction of travel (so my ship will go right past the mouse object, untill the next mouseclick to give it a new heading).

Thanks in advance for any help.

Mike

put this in your code snippets, code lang = dbp
mikewhl
14
Years of Service
User Offline
Joined: 19th Jul 2010
Location: Columbus,Ohio
Posted: 5th Sep 2010 02:27 Edited at: 5th Sep 2010 02:43
I think I have it.
It seems game logic, (which I foolishly thought would be the easy part), takes a minute to work through. A minute in this case being about 2 1/2 hours!



Anyone see a better way to do this?

Mike

put this in your code snippets, code lang = dbp

Login to post a reply

Server time is: 2024-11-24 11:59:24
Your offset time is: 2024-11-24 11:59:24