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: Object must always look ahead  (Read 11570 times)

Pirmin

  • Newbie
  • *
  • Posts: 11
    • View Profile
Object must always look ahead
« on: October 11, 2008, 04:38:35 am »

I have a vehicle the does some movements (I start with a circle).
My vehicle always should look ahead where it is moving to.
I will write the Location Controllers to do more movements (e.g. lines, curves, ...) depending on the current frame.
I could in parallel write Orientation Controllers to set the desired orientation at any location.
Isn't there a way to just write a single Orientation controller which always assures that the orientation stays ahead?
Logged

Kubajzz

  • Flying Platypus
  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 548
  • Little doggie ate my avatar...
    • View Profile
Re: Object must always look ahead
« Reply #1 on: October 11, 2008, 04:45:33 am »

You can try creating only the position controller and set the orientation to "facing path".
Logged

Pirmin

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Object must always look ahead
« Reply #2 on: October 11, 2008, 05:24:59 am »

I have tried a lot.
  • Relative to Parent -> Vehicle is allways looking to Z direction
  • Relative to Path -> Vehicle is allways looking to X direction
  • Relative to Other, Path -> Error: No such element
  • Relative to Facing Other, Path -> Error: No such element
???
Logged

Kubajzz

  • Flying Platypus
  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 548
  • Little doggie ate my avatar...
    • View Profile
Re: Object must always look ahead
« Reply #3 on: October 11, 2008, 05:38:15 am »

Oh, sorry, I wrote "facing path", I meant "Relative to Path"... Yes, you're right, I've just tried it and I found out that the "relative to path" function doesn't work when the path is created by a controller script...

I'm afraid you'll have to animate the orientation by hand... Or you can use key frames instead of a controller script for position - that would make "relative to path" work correctly...
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: Object must always look ahead
« Reply #4 on: October 12, 2008, 05:52:43 pm »

Hmm.  The problem with controller scripts for position is that they have no derivative - i.e. direction.  They only return the position at a specific frame.  I suppose I could evaluate the position at frame N-1 and N+1 and use those to create a derivative.  This would require me to change how controllers are evaluated in general.  Now Anim8or assumes that only one frame's data is needed at a time.
« Last Edit: October 14, 2008, 01:05:21 am by Steve »
Logged

Pirmin

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Object must always look ahead
« Reply #5 on: October 13, 2008, 03:44:03 pm »

To solve my problem I have used key frames for animation as proposed by Kubajzz.
Therefore I don't need the feature "look ahead".
But I think it could be usefull in future for me and for others.
Logged

3D Joe Wiltshire

  • Sr. Member
  • ****
  • Posts: 728
  • Winter's Coming :O
    • View Profile
Re: Object must always look ahead
« Reply #6 on: October 14, 2008, 07:06:41 pm »

Sounds like a good idea, random moving objects in the background would be a lot easier for people who are able to actually write that sort of script, it would free up a lot of time.

eg.
Get random planes to fly around, without having to make them face the right way frame by frame.
Logged

kreator

  • Hero Member
  • *****
  • Posts: 1146
  • Anim8or, Blender, & Carrara. A Great Combination!
    • View Profile
    • Anim8orWorld
Re: Object must always look ahead
« Reply #7 on: October 14, 2008, 07:35:58 pm »

Logged
O