Parent actor's rotation does not apply to children, but does apply to grandchildren #7

Closed
opened 2022-01-04 21:05:40 +00:00 by keith · 2 comments
Owner

For some reason, the position of the child-actor in (wh-engine:register-test-scene) is not affected by the rotation of its parent, but the position of grandchild-actor is affected by test-actor-2's rotation. I'm not sure if this applies just to rendering or to all transformation-related calculations, but I think the bug is in one or more of these:

  • the actor's local-to-parent transformation matrix
  • computation of the actor's world-matrix
  • opengl-matrix conversion

(ac990359cb is the commit that revealed the full weirdness of this bug, but rotation was never being applied properly to the child-actor's location.)

For some reason, the position of the `child-actor` in `(wh-engine:register-test-scene)` is not affected by the rotation of its parent, but the position of `grandchild-actor` *is* affected by `test-actor-2`'s rotation. I'm not sure if this applies just to rendering or to all transformation-related calculations, but I think the bug is in one or more of these: - the actor's local-to-parent transformation matrix - computation of the actor's world-matrix - opengl-matrix conversion (ac990359cb is the commit that revealed the full weirdness of this bug, but rotation was never being applied properly to the `child-actor`'s location.)
keith added the
bug
label 2022-01-04 21:05:40 +00:00
Author
Owner

Took a second look at it just now, and... this is what happens when test-actor-2 rotates. What the hell is this.

Took a second look at it just now, and... this is what happens when `test-actor-2` rotates. What the hell *is* this.
Author
Owner

OH THE MATRIX MULTIPLICATION WAS JUST THE WRONG WAY AROUND

OH THE MATRIX MULTIPLICATION WAS JUST THE WRONG WAY AROUND
keith closed this issue 2022-02-14 18:45:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: keith/wh-engine#7
No description provided.