-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Fix bounding box of duplicated game objects.
Previously three issues were noticed: Firstly the game object bounding box wasn't updated for an added object, only the original bounding box was copied, this original bounding box could be fake if the original object doesn't have any replications which update the bounding box. To solve this issue a call to KX_GameObject::UpdateBounds is added in AddNodeReplica. This call must be after the scene graph node and the graphic controller was set. The second issue encountered when appliying the first fix was that the original bounding box from the original game object was copied after AddNodeReplica call. This copy was proceed in multiple places and destroyed the just updated bounding box. To avoid this effect the box copy is set into AddNodeReplica function. Finally the bounding box was wrongly update because the "force" argument passed to KX_GameObject::UpdateBound was used to hijack auto update test but not the test checking if the bounding box is not modified. A condition checking "force" is added. Fix issue #385.
- Loading branch information
1 parent
e9b8f9e
commit cc1f990
Showing
3 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc1f990
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍