/// <summary>
 /// Called when this physical body start colliding with another body.
 /// </summary>
 /// <param name="other">The other body we collide with.</param>
 /// <param name="data">Extra collision data.</param>
 public void CallCollisionStart(BasePhysicsComponent other, Core.Physics.CollisionData data)
 {
     if (_GameObject != null && other._GameObject != null)
     {
         _GameObject.CallCollisionStart(other._GameObject, data);
     }
 }
 /// <summary>
 /// Called while this physical body is colliding with another body.
 /// </summary>
 /// <param name="other">The other body we are colliding with.</param>
 public void CallCollisionProcess(BasePhysicsComponent other)
 {
     if (_GameObject != null && other._GameObject != null)
     {
         _GameObject.CallCollisionProcess(other._GameObject);
     }
 }
Exemple #3
0
        /// <summary>
        /// Copy basic properties to another component (helper function to help with Cloning).
        /// </summary>
        /// <param name="copyTo">Other component to copy values to.</param>
        /// <returns>The object we are copying properties to.</returns>
        protected override BaseComponent CopyBasics(BaseComponent copyTo)
        {
            BasePhysicsComponent ret = copyTo as BasePhysicsComponent;

            ret.InvokeCollisionEvents = InvokeCollisionEvents;
            ret.IsEthereal            = IsEthereal;
            ret.CollisionGroup        = CollisionGroup;
            ret.CollisionMask         = CollisionMask;
            ret.EnableSimulation      = EnableSimulation;
            ret.Restitution           = Restitution;
            ret.WorldTransform        = WorldTransform;
            ret.Scale = Scale;
            return(base.CopyBasics(ret));
        }