ivansafrin/Polycode — Issue #56: SetTransform undoes applied forces
Author: mcclure
Created: 2011-11-24 20:59:13+00:00
State: open

SetTransform() appears to have several unexpected behaviors and side effects. For one thing it appears to reset/zero out all forces applied to an object in the current "frame"

For example, if I apply a force then setTransform() to change the angle, OR if I setTransform and then apply the force afterward, the force will have no effect.

This came up for me because I had a game with a "spaceship" ; on each frame I tried to "move" it by applying a force based on which of the arrow keys are being pressed, and also SetTransform it to rotate it such that it is facing the mouse. The movement via force worked until I added the per-frame SetTransform, then it stopped working. You can see my sample code for this bug here (see "get source" in upper right corner): https://bitbucket.org/runhello/luatest/changeset/95b0f5f63d0d