Example #1
0
        protected override void Uninitialize(BepuPhysicsSystem system)
        {
            this.Transform.PositionChanged -= OnTransformPositionManuallyChanged;
            this.Transform.RotationChanged -= OnTransformRotationManuallyChanged;

            if (this.physicsEntity != null)
            {
                system.RemoveObject(this.physicsEntity);
            }
        }
Example #2
0
        protected override void Initialize(BepuPhysicsSystem system)
        {
            this.Transform.PositionChanged += OnTransformPositionManuallyChanged;
            this.Transform.RotationChanged += OnTransformRotationManuallyChanged;
            this.Transform.ScaleChanged    += OnTransformScaleManuallyChanged;

            this.system        = system;
            this.PhysicsEntity = InitPhysicsEntity();

            OnTransformPositionManuallyChanged(this.Transform.Position);
            OnTransformRotationManuallyChanged(this.Transform.Rotation);
        }
Example #3
0
 protected override void Initialize(BepuPhysicsSystem system)
 {
     base.Initialize(system);
     this.Transform.ScaleChanged += OnScaleChanged;
 }