Пример #1
0
 public JointForceWeld(Entity one, Entity two)
 {
     One = one;
     Two = two;
     Matrix worldTrans = Matrix.CreateFromQuaternion(One.GetOrientation()) * Matrix.CreateTranslation(One.GetPosition().ToBVector());
     Matrix.Invert(ref worldTrans, out worldTrans);
     Relative = (Matrix.CreateFromQuaternion(two.GetOrientation())
         * Matrix.CreateTranslation(two.GetPosition().ToBVector()))
         * worldTrans;
 }
Пример #2
0
 public void Destroy(Entity ent)
 {
     SpotLight sl = null;
     if (ent is CharacterEntity)
     {
         sl = ((CharacterEntity)ent).Flashlight;
         ((CharacterEntity)ent).Flashlight = null;
     }
     if (sl != null)
     {
         sl.Destroy();
         TheClient.MainWorldView.Lights.Remove(sl);
     }
 }