Sign Up, Lost Password
Comments for Mouse Follower
Return to Mouse Follower
That makes a nice demo. So even if you are developing it further, it might be nice to keep this version here for others to look at. Orienting an actor to a specific point is a thing that many people need, so a short little example like this is good!
Yes, it'd be nice to see people get some use out of this for their own projects.
A new version of this scenario was uploaded on Sun Apr 10 02:04:58 UTC 2011 Refactored the code to be more useful and easier to read. Made the plane position wrap around at the edge of the screen.
A new version of this scenario was uploaded on Sun Apr 10 22:00:58 UTC 2011 Added a gun turret to the plane which fires when any mouse button is clicked.
Nice! How about you make it so it has modes? e.g. "1" for turning delay (like what it is right now, taking its time trying to face the mouse) and "2" for instant turn (the plane faces the mouse instantly). It would be cool if you can make different modes like that!
Yeah, I could add something like that. Right now you can change the turning speed in the code, so I could map the mouse scroll wheel (or keyboard keys) to increase and decrease turning speed. Then setting a high speed would make the turning instant.
Instead of setting a really high speed, you could download my Follow the Leader Sim to find out how to make a true instant turn.
I could change it so that if you don't set a turning speed it defaults to an instant turn. The code I have now does make it turn instantly, pretty much the same as yours. The speed just has to be at least 180 degrees per frame.
A new version of this scenario was uploaded on Mon May 23 07:50:51 UTC 2011 Added light flashes for bullets. Added really simple music that doesn't work yet.
A new version of this scenario was uploaded on Mon May 23 07:54:23 UTC 2011 Got rid of the music for now, since it's not working.
A new version of this scenario was uploaded on Tue May 24 02:50:53 UTC 2011
A new version of this scenario was uploaded on Tue May 24 02:58:50 UTC 2011 Retrying export so audio will work on the website.
A new version of this scenario was uploaded on Tue May 24 03:04:31 UTC 2011 Reuploading for music.
A new version of this scenario was uploaded on Tue May 24 20:44:35 UTC 2011 I gave up on dynamic music and just went with a static song.
You haven't been active much. This should be something when u get on. I have some Fresh Programming homework for you: Making a small scenario that connects to a special file created by the same project and reads a special format ([ARTICLE]/[TEXT] Per line) and prints it onto the screen. Nice tackler, don't you think? I shall give this to other Fresh Programming members to see their responses. Comment on my most recent scenario with the first words saying "Fresh Programming Homework". Good Luck!
Thanks for including your code--it's way too advanced for me, but someday I hope to implement mouse-directed movement.
Woah I LOVE the music, lol the game looks great!