How to recalculate axis-aligned bounding box after translate/rotate?

后端 未结 5 1814
天命终不由人
天命终不由人 2020-12-14 17:58

When I first load my object I calculate the initial AABB with the max and min (x,y,z) points. But this is in object space and the object moves around the world and more impo

5条回答
  •  清歌不尽
    2020-12-14 18:03

    To quote a previous response: AABB @ Stackoverflow

    "Sadly yes, if your character rotates you need to recalculate your AABB . . .

    Skurmedel


    The respondent's suggestion, and mine, is to implement oriented bounding boxes once you have AABB working, and also to note you can make aabb's of portions of a mesh to fudge collision detection with greater accuracy than 1 enormous box for each object.

提交回复
热议问题