jj_character_step function

  1. @Native<Void Function(Int64, Float, Pointer<Float>, Pointer<Float>, Pointer<Float>, Pointer<Float>, Pointer<JJ_CharacterState>)>(ffi.Int64, ffi.Float, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>, ffi.Pointer<JJ_CharacterState>)>()
void jj_character_step(
  1. int character,
  2. double dt,
  3. Pointer<Float> velocity,
  4. Pointer<Float> gravity,
  5. Pointer<Float> stepDown,
  6. Pointer<Float> stepUp,
  7. Pointer<JJ_CharacterState> out,
)

Sets the character's velocity, then moves it by one update: CharacterVirtual::ExtendedUpdate, which slides along walls, sticks to the floor (stepDown, pointing down) and climbs stairs (stepUp, pointing up). A zero stepDown or stepUp turns that part off.

Implementation

@ffi.Native<
  ffi.Void Function(
    ffi.Int64,
    ffi.Float,
    ffi.Pointer<ffi.Float>,
    ffi.Pointer<ffi.Float>,
    ffi.Pointer<ffi.Float>,
    ffi.Pointer<ffi.Float>,
    ffi.Pointer<JJ_CharacterState>,
  )
>()
external void jj_character_step(
  int character,
  double dt,
  ffi.Pointer<ffi.Float> velocity,
  ffi.Pointer<ffi.Float> gravity,
  ffi.Pointer<ffi.Float> stepDown,
  ffi.Pointer<ffi.Float> stepUp,
  ffi.Pointer<JJ_CharacterState> out,
);