Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Controller script blues  (Read 5795 times)

Roygee

  • Newbie
  • *
  • Posts: 41
  • Carpa diem
    • View Profile
Controller script blues
« 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
Logged
Reality is an illusion brought on by an absence of imagination

Kubajzz

  • Flying Platypus
  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 548
  • Little doggie ate my avatar...
    • View Profile
Re: Controller script blues
« Reply #1 on: June 15, 2008, 04:49:26 pm »

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...
Logged

Roygee

  • Newbie
  • *
  • Posts: 41
  • Carpa diem
    • View Profile
Re: Controller script blues
« Reply #2 on: June 16, 2008, 12:34:23 am »

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 :)
« Last Edit: June 16, 2008, 12:49:10 am by Roygee »
Logged
Reality is an illusion brought on by an absence of imagination