public void CreateEntity() { _node.Scale = _scale; if (!InDesign) { RigidBody rigidBody = _node.CreateComponent <RigidBody>(); rigidBody.Mass = 1.0f; rigidBody.SetAngularFactor(Vector3.Zero); CollisionShape planeShape = _node.CreateComponent <CollisionShape>(CreateMode.Local); planeShape.SetStaticPlane(_baseEntity.Position, Quaternion.Identity); rigidBody.DrawDebugGeometry(GetDebugRenderer(), false); } }
public void CreateEntity() { if (_node == null) { if (_scene != null) { _node = _scene.CreateChild(_name); } } if (_node != null) { if (_baseEntity == null) { _baseEntity = _node.CreateComponent <BaseEntity>(); } } _wirePlane = new Urho.WirePlane() { Scale = _scale, Size = _size, Color = _color }; if (_node != null) { _node.AddComponent(_wirePlane); } if (!InDesign) { RigidBody rigidBody = Node.CreateComponent <RigidBody>(); rigidBody.Mass = 1.0f; rigidBody.SetAngularFactor(Vector3.Zero); CollisionShape planeShape = Node.CreateComponent <CollisionShape>(CreateMode.Local); planeShape.SetStaticPlane(Position, Quaternion.Identity); rigidBody.DrawDebugGeometry(DebugRenderer, false); } }