纳金网

标题: Gravity (Physics Behavior) [打印本页]

作者: Asen    时间: 2011-10-15 10:30
标题: Gravity (Physics Behavior)






               Gravity (Physics Behavior)
              









           Summary
         

           Provides a constant pull on objects in a particular direction.
         





               Category
              


              Latest Behaviors
            




               Author
              


              Gavin Kistner
            




               Difficulty
              


              (Reference)
            




               Time to Complete
              


              5 Minutes
            








           Downloads
         


            Click Here
           
           to download the associated files.
         


            (This document covers version 1.0.4 of the 'Gravity' behavior, current as of 2005-Aug-04)
           

            Description
           


             Attach this behavior to an object to make it feel the
            

             effects of gravity. The object will be constantly accelerated
            

             in the direction indicated by the
            
              Gravity Direction
            
             parameter, at a rate specified by the
            
              Gravity Force
            
             .
            

             (Acceleration is applied by modifying the positionVelocity vector.)
            

             If
            
              Use Terminal Velocity?
            
             is checked, the object will be prevented from going any faster than the
            
              Terminal Velocity
            
             value. Further, the events
            
              Reached Terminal Velocity
            
             and
            
              Under Terminal Velocity
            
             will fire as the object crosses between the two states.
            

             The
            
              Gravity Direction
            
             vector does not need to be normalized, but does not affect the force of gravity.
            

             This behavior can be used in conjunction with Collider for Simulations (and Collision Shell) to cause objects to bounce around in a semi-realistic manner.
            


            Basic Properties
           



              Gravity Force
            

              Acceleration force in units/s^2
            

              Start Immediately?
            

              Start applying gravity immediately, or wait for the Start action to be called?
            



            Advanced Properties
           



              Gravity Direction
            

              Direction for gravity to pull.
            

              Use Terminal Velocity?
            

              Should the object stop accelerating past a certain speed?
            

              Terminal Velocity
            

              Maximum speed for the object, in units/second.
            



            Actions
           



              Start
            

              Start applying gravity.
            

              Stop
            

              Stop applying gravity.
            

              Toggle
            

              If gravity is on, turn it off; otherwise, turn it on.
            



            Events
           



              Started
            

              Fires when gravity is turned on.
            

              Stopped
            

              Fires when gravity is turned off.
            

              Reached Terminal Velocity
            

              Fires if the object hits terminal velocity after having been slower than it.
            

              Under Terminal Velocity
            

              Fires if the object was at terminal velocity and slowed down.
            



            Demonstration
           




              View Demonstration Project
            




              Download Project File
            




作者: 晃晃    时间: 2012-2-26 23:31
先垫一块,再说鸟

作者: 奇    时间: 2012-8-18 23:51
先垫一块,再说鸟

作者: tc    时间: 2012-11-14 04:04
呵呵,很好,方便罗。





欢迎光临 纳金网 (http://wwww.narkii.com/club/) Powered by Discuz! X2.5