I wanted to see if I could make a character animate when turning on the spot. I noticed that larger pre-rendered 3D characters looked a little jerky when rotating through 8 directions. I've cobbled together a little script that allows them to animate while rotating - so they could rotate smoothly or step round in a circle realistically.
You can download the game files here (4.09mb):
http://themonkeyhut.tripod.com/Animated_Rotation.html
I will probably replace the on-mouse-click script with a animated turning function that could be called from any script.
The script doesn't work perfectly at the moment. It seems to me that the regular walking function doesn't use diagonal loops, so when he walks diagonally the character snaps into either north, south east or west.
I was wondering if you guys could help me work out a way of specifying what loop to play while the character is walking, so this would work more smoothly. I also wanted suggestions on how to streamline and improve my scripting, because I know nothing about this sort of thing.
I'd apprecate any feedback, including whether this would be at all useful to anyone.
You can download the game files here (4.09mb):
http://themonkeyhut.tripod.com/Animated_Rotation.html
I will probably replace the on-mouse-click script with a animated turning function that could be called from any script.
The script doesn't work perfectly at the moment. It seems to me that the regular walking function doesn't use diagonal loops, so when he walks diagonally the character snaps into either north, south east or west.
I was wondering if you guys could help me work out a way of specifying what loop to play while the character is walking, so this would work more smoothly. I also wanted suggestions on how to streamline and improve my scripting, because I know nothing about this sort of thing.
I'd apprecate any feedback, including whether this would be at all useful to anyone.