public override void TryCollide(InfinitePlaneCollider other) { if (!other.GameObject.Enabled) { return; } var position = GameObject.Transform.Position; var otherPosition = other.GameObject.Transform.Position; if (position.Y > otherPosition.Y) { return; } GameObject.Transform.Position = GameObject.Transform.Position.WithY(otherPosition.Y); if (GameObject.RigidBody != null) { GameObject.RigidBody.Velocity = Vec3.Zero; } OnCollision(other, position, Vec3.Up); }
public virtual void TryCollide(InfinitePlaneCollider plane) { }