public XTriggerVolume(ref XMain X, XPhysicsObject obj, bool Continuous, Vector3 translation, Quaternion rotation, Vector3 scale) : base(ref X) { this.obj = obj; continuous = Continuous; triggered = false; this.translation = translation; this.rotation = rotation; this.scale = scale; }
public XAnimatedActor(ref XMain X, XPhysicsObject Object, XModel model, Vector3 ModelScale, Vector3 Velocity, float Mass) : base(ref X, Object, model, ModelScale, Velocity, Mass) { if (model != null) { model.Parent = this; } }
public XActor(ref XMain X, XPhysicsObject Object, XModel model, Vector3 ModelScale, Vector3 Velocity, float Mass) : base(ref X) { DrawOrder = 100; if (model != null) { this.model = model; model.Parent = this; this.modelNumber = model.Number; } this.PhysicsObject = Object; this.PhysicsObject.SetMass(Mass); this.PhysicsObject.scale = ModelScale; this.PhysicsObject.PhysicsBody.Velocity = Velocity; this.PhysicsObject.PhysicsBody.SetDeactivationTime(0.1f); this.PhysicsObject.PhysicsBody.SetActivityThreshold(5f, 5f); }
public void RebuildCollisionSkin() { this.PhysicsObject = new XBoneMapObject(Vector3.Zero, ref model); this.PhysicsObject.PhysicsBody.SetDeactivationTime(0.1f); this.PhysicsObject.PhysicsBody.SetActivityThreshold(5f, 5f); //set a bunch of parameters that require a physics object PhysicsObject.PhysicsBody.MoveTo(translation, Matrix.Identity); PhysicsObject.PhysicsBody.Orientation = Matrix.CreateFromQuaternion(rotation); PhysicsObject.PhysicsBody.Immovable = immovable; PhysicsObject.PhysicsBody.Velocity = velocity; PhysicsObject.scale = scale; PhysicsObject.SetMass(mass); if (collisionenabled) { PhysicsObject.PhysicsBody.EnableBody(); } else { PhysicsObject.PhysicsBody.DisableBody(); } }
public XCubeTriggerVolume(ref XMain X, XPhysicsObject obj, bool Continuous, Vector3 Point1, Vector3 Point2, Vector3 translation, Quaternion rotation, Vector3 scale) : base(ref X, obj, Continuous, translation, rotation, scale) { box = new BoundingBox(Point1, Point2); }