Example #1
0
        /// <summary>
        /// Creates a capsule shape in the world
        /// </summary>
        /// <param name="capsuleDescription"></param>
        /// <param name="colliderDescription"> </param>
        /// <returns></returns>
        public IWorldObject CreateWorldObject(CapsuleDescription capsuleDescription, ColliderDescription colliderDescription)
        {
            lock (this)
            {
                var rigidBody = new RuneRigidbody(new RuneCapsuleShape(capsuleDescription.Radius, capsuleDescription.Height))
                {
                    Pose  = new Pose(capsuleDescription.Position.ToRuneVector(), capsuleDescription.Rotation.ToRuneQuaternion()),
                    Scale = capsuleDescription.Scale.ToRuneVector(),
                };
                UpdateRigidbodyCollisionSettings(rigidBody, ref colliderDescription);
                this.simulation.RigidBodies.Add(rigidBody);

                return(rigidBody);
            }
        }
Example #2
0
 /// <summary>
 /// Creates a capsule shape in the world
 /// </summary>
 /// <param name="capsuleDescription"></param>
 /// <param name="colliderDescription"> </param>
 /// <returns></returns>
 public IWorldObject CreateWorldObject(CapsuleDescription capsuleDescription, ColliderDescription colliderDescription)
 {
     return(null);
 }