YoFrankie example overview

From MaratisWiki
Revision as of 15:13, 7 February 2014 by Dahnielson (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Scene Overview

Here's the scene when you just open the example :

global_1.png

Look at that sheep :

sheepglobal_1.png

  • The Sheep model : Its only a graphical model, there is no physics or actions bound to it (only animations)
  • The cube around around the sheep : It's the sheep bounding box.
    This is that cube who will receive physics and movement scripts
  • The small box who stands at the sheep feets : It's the Feet box, it has physics proprieties and its set to ghost mode.
    That is used to count if there is a collision with the ground or not.


Your probably noticed that when you move the "player box", the sheep model and the feet box are moving together with it,
but you still can move sheep and feet box individually.
This is because the sheep and the feet box are linked to the player box.

linkselection_1.png

Same process for the camera (so if theres a wall on its way, the camera won't go through)

Script Overview

script1.png

The 3 objects who will receive modifications :
Sheep, for animation only.
Player, For physics and movements.
Feet, To check collision with the ground.


script2.png

The line "coll = get..." is for the feet box. this is that one
who will count the number of collisions between feet and the ground
and "move = 0" will be for movement


script3.png

Here, the force that will make the player move is stored in move == 1.


script4.png

And here, when key LEFT is pressed, it will rotate the player AND move it
forward because move = 1 is used

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox