1 / 14

Entity Animation and 3D Math

Entity Animation and 3D Math. LoadAnimSeq SetAnimKey AddAnimSeq ExtractAnimSeq Animate SetAnimTime AnimSeq AnimLength AnimTime Animating. Entity Animation. LoadAnimSeq. LoadAnimSeq( Model, fileName$ ). Example Code: Model = LoadAnimMesh(“Model.b3d”)

dwilde
Download Presentation

Entity Animation and 3D Math

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Entity Animation and 3D Math

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

  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 VectorYaw# (x#, y#, z#) Returns the yaw value of a vector VectorPitch VectorPitch# (x#, y#, z#) Returns the pitch value of a vector

More Related