Teardown-Issue-Tracker-Maintainers / Teardown-Issue-Tracker

A public repo for the community to track issues/bugs/feature requests in Teardown.
12 stars 5 forks source link

[Documentation] Constraint functions self-contradicting #577

Open YuLun-bili opened 3 months ago

YuLun-bili commented 3 months ago

Document to improve

All 4 constraint functions: ConstrainVelocity() ConstrainAngularVelocity() ConstrainPosition() ConstrainOrientation()

In description/explanation it says

This function should only be used from the update callback.

while the example code just below all used tick() function calls (this one is for ConstrainAngularVelocity())

function tick()
    --Constrain the angular velocity between bodies A and B so that the relative angular velocity
    --along the Y axis is always 3 rad/s
    ConstrainAngularVelocity(handleA, handleB, Vec(1, 0, 0), 3)
end

Enhancement

Update documentation so that it's not self-contradicting

YuLun-bili commented 3 months ago

and same issue in experimental API which currently is in sync with game version (https://teardowngame.com/experimental/api.html#ConstrainVelocity)