AddCentralForce

From MaratisWiki
Revision as of 18:32, 11 April 2012 by Vegas (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Add a force than an object. Make sure Physics and the mass of the object is enabled in the object proprieties, otherwise it won't move.

Example 1 : Simple usage

   object = getObject("object") 
   function onSceneUpdate()
       addCentralForce(object, {1, 0, 0}, "local")
   end

Example 2 : Use a variable to determinate the force

   object = getObject("object") 
   power = 1
   function onSceneUpdate()
       addCentralForce(object, {power, 0, 0}, "local")
   end
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox