Anim8or Community
General Category => General Anim8or Forum => Topic started by: Roygee on June 15, 2008, 04:38:48 pm
-
Hi all - I'm trying to get some understanding of controller scripts - especially spin. The script I've been trying to use is from Beiderman's site, as well as assistance from Kreator, to spin in the Z axis
float $speed;
$speed = 5; /* Replace 5 by your value for speed */
$orientation = (0, 0, sin($speed*time), cos($speed*time));
I always get a Parse error in the last line and nothing happens. Even tried leaving in the first default line, but no luck. The one time when it did work, by some unknown luck, the object spun, but always at 1.5 rotations per second, anti-clockwise, regardless of me changing values, even inputting negative values. Have tried in V.95 and .96a; same result.
Would very much appreciate some assistance here
-
I tried the code you posted and it works fine for me...
The problems you described look very strange... The only thing that comes across my mind is... Aren't you trying to rotate a bone using this script? This script is supposed to be used for the orientation controller, no scripts work for bones in the current version of Anim8or...
-
Hi Kubajzz - nope, no bones, just a simple disc object, nothing else in the file. Tried it again this morning, still getting Parse error in third line. ???
EDIT: Problem solved - I was editing the position instead of the orientation - works just fine, thanks for the interest - and the hint :)