Exemplo n.º 1
0
        void CreateCollider()
        {
            _colliderComponent = new StaticColliderComponent();

            var shape = new StaticMeshColliderShape(colVerts, tris,
                                                    Vector3.One);

            _colliderComponent.ColliderShape = shape;
            _colliderComponent.CanSleep      = true;
            Entity.Add(_colliderComponent);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates the physics collider
        /// </summary>
        private void CreateCollider()
        {
            _colliderComponent = new StaticColliderComponent();
            var shape = new StaticMeshColliderShape(_colVertices, indices, Vector3.One);

            _colliderComponent.ColliderShape = shape;

            // Not sure if this is strictly necessary but can save cpu time according to the docs
            _colliderComponent.CanSleep = true;

            Entity.Add(_colliderComponent);
        }