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

                return(rigidBody);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a cylinder shape in the world
 /// </summary>
 /// <param name="cylinderDescription"></param>
 /// <param name="colliderDescription"> </param>
 /// <returns></returns>
 public IWorldObject CreateWorldObject(CylinderDescription cylinderDescription, ColliderDescription colliderDescription)
 {
     return(null);
 }