private void UpdateTransformFrame(float dt) { if (simulateInLocalSpace) { Vector4 translation = transform.position; Vector4 scale = transform.lossyScale; Quaternion rotation = transform.rotation; Oni.UpdateFrame(this.oniSolver, ref translation, ref scale, ref rotation, dt); Oni.ApplyFrame(this.oniSolver, worldLinearVelocityScale, worldAngularVelocityScale, worldLinearInertiaScale, worldAngularInertiaScale, dt); } else { Vector4 translation = Vector4.zero; Vector4 scale = Vector4.one; Quaternion rotation = Quaternion.identity; Oni.InitializeFrame(this.oniSolver, ref translation, ref scale, ref rotation); } }
public void ApplyFrame(float worldLinearInertiaScale, float worldAngularInertiaScale, float deltaTime) { Oni.ApplyFrame(oniSolver, 0, 0, worldLinearInertiaScale, worldAngularInertiaScale, deltaTime); }