class

Flock::Collision::Physics3DPlugin

Inherits Flock::Plugin < Reference < Object

Wires 3D physics into a Flock App:

  • inserts the Physics3D resource
  • registers the Contact3D event type
  • runs Collision.step3d each FixedUpdate (label :physics3d)

app.add_plugin(Flock::Collision::Physics3DPlugin.new(gravity: Flock::Vec3.new(0, -20, 0)))

Constructors

new(gravity : Flock::Vec3 = Flock::Vec3.new(0, -9.81, 0), velocity_iterations : Int32 = 8, cell : Float32 = 1.0_f32, allow_sleeping : Bool = true)
Source

Instance methods

build(app : Flock::App)
Source