From: Roberto I. <ro...@gm...> - 2006-11-09 19:33:34
|
>> I'd like to simply bind the press of a key to a custom animation (a >> rotation around an axis at a fixed speed, between two extreme positions, >> in both directions), can you point me to a simple/basic example? >> > > You can use the nasal "interpolate" function to do that if I understand you > correctly. You can write a nasal function using interpolate to manipulate > any property you want and call it from a keybinding (see for example the > beaufighter gunsight & door toggle functions.) > > Cheers, > > AJ > Thank you AJ, that was the right hint :-) The beaufighter door animation is the one I needed, simple and effective. Now, I have a fully working rotate animation and proper key bindings. I have to point out the beaufighter toggle_cdoor function is not completely correct (it doesn't work right if you toggle the animation while the door is already rotating). I had to change it a little bit in order to get it at constant speed. But that was a very solid point to start from; now I know a little how to write such animation nasal scripts :-) I whish there were more NASAL tutorials around. cheers, Roberto |