HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Moving Static Objects  (Read 1593 times)

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Moving Static Objects
« on: Apr 10, 16, 11:25:21 PM »

I've been tied up with a lot here at home and also busy on AoH, so I've still not fully completed the SpecOracle tutorial I know, but while this is fresh on my mind I wanted to write it down.

I've been dealing with this issue the past few days in AoH, and after alot of trial and error came up with the following.

The Wiki has some good information regarding Animated Objects..  but leaves some specific info out.


Function: SetModelAnimationSpeed()
the wiki mentions this external function but gives no information about it.

In using it, i determined that it absolutely did nothing...

In the end, this is because my model was animated using KeyFrames only.

SetModelAnimationSpeed() (and other animated object model functions) Expects that your
animation is done using a BONE.  Any bone, any name, but a bone nonetheless.

Another area the wiki is vague is this:

your model must consist of only 1 ONE, mesh OR GROUP.
Since your animated object must have a bone if you expect to use the animation functions,
then it stands to reason you MUST use a group.

So The following shows two possible outcomes, for two very different purposes:

1) Stationary animated object
    Create a bone, and link your mesh to the bone.
    Animate the object using the BONE
    Group both bone(s) and mesh together.
    Export your group to HE.
   
    In this situation your mesh will animate, BUT the GROUP will NOT Move.

2) Object which is expected to move in 3d space and CHANGE position
    Create a bone, and link your mesh to the bone.
    Group both bone(s) and mesh together.
    Animate the GROUP using the bone.
    Export your group to HE.

    In this situation, your GROUP will animate and change position in doing so.
    For example, a ride...

In the first example, the object animates, returns to its home position and continues
to loop in this fashion.
In the second example, for example a ride that moves along its x axis, if looping, will
continue to move in that direction until stopped.

If you have anything to add to this, feel free as always.