Presentation is loading. Please wait.

Presentation is loading. Please wait.

Entity Animation and 3D Math

Similar presentations


Presentation on theme: "Entity Animation and 3D Math"— Presentation transcript:

1 Entity Animation and 3D Math

2 Entity Animation LoadAnimSeq SetAnimKey AddAnimSeq ExtractAnimSeq
Animate SetAnimTime AnimSeq AnimLength AnimTime Animating

3 LoadAnimSeq LoadAnimSeq( Model, fileName$ ) Example Code:
Model = LoadAnimMesh(“Model.b3d”) WalkAnimation = LoadAnimSeq(Model,”Walk.b3d”)

4 Animate Animate model[,mode][,speed#][,sequence][,transition#]
Example Code: Model = LoadAnimMesh(“Model.b3d”) WalkAnimation = LoadAnimSeq(Model,”Walk.b3d”) Animate Model or Animate Model,3,1,WalkAnimation,0

5 SetAnimTime SetAnimTime model, time#[,animationSeq] Use:
You can make a time loop in your code to manually animate a model.

6 AnimTime AnimTime# (model) Use:
Returns the current time of the animation

7 AnimLength AnimLength (model) Use:
Returns the length of the current animation Problem: You must be playing the animation

8 AnimSeq AnimSeq( model ) Use:
This function can be used to check if the current animation sequence is playing or has been played last. Problem: If your animation sequence stops playing, the AnimSeq still returns that sequence (can’t check if it is still in play)

9 Animating Animating( model ) Use:
This function can be used to check if the current model is animating Combine this w/ AnimSeq to check if a particular animation sequence has stopped playing

10 SetAnimKey SetAnimKey model, frame Use:
If you have a number of animations and you want to record them or create a new animation using the current few that you have

11 AddAnimSeq AddAnimSeq (model, length) Use:
When you are done setting the animation keys, you can use this command to put what you recorded into an animation to play back later. Example: For frame=1 To 10 SetAnimKey model, frame Next AnimSequence = AddAnimSeq(model,frame-1)

12 ExtractAnimSeq ExtractAnimSeq(model,first_frame,last_frame) Use:
If you have a animation that has multiple animations in it such as walk, run, idle. You can use this command to break up the original animation into multiple sequences Example: model = LoadAnimMesh(filename$) walkAnimSeq = ExtractAnimSeq( model, 0, 30) idleAnimSeq = ExtractAnimSeq( model, 31, 40) Animate model,1,1,idleAnimSeq

13 3D Math VectorYaw VectorPitch

14 VectorYaw VectorPitch
VectorYaw# (x#, y#, z#) Returns the yaw value of a vector VectorPitch VectorPitch# (x#, y#, z#) Returns the pitch value of a vector


Download ppt "Entity Animation and 3D Math"

Similar presentations


Ads by Google