Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hack to draw shapes in 3D physics tests #615

Merged

Conversation

pouleyKetchoupp
Copy link
Contributor

Using Shape::get_debug_mesh instead of the previous hack to draw a mesh instance based on a collision shape.

Needs godotengine/godot#48316 to work (cherry-picked for 3.3.1).
It will be the only option after godotengine/godot#48175 is merged.

Using Shape::get_debug_mesh instead of the previous hack to draw a mesh
instance based on a collision shape.
@aaronfranke
Copy link
Member

It will be the only option after godotengine/godot#48175 is merged.

If godotengine/godot#48175 breaks compatibility, then why is it marked as cherry-pick for 3.3? Shouldn't it only be 3.x at most?

@pouleyKetchoupp
Copy link
Contributor Author

It will be the only option after godotengine/godot#48175 is merged.

If godotengine/godot#48175 breaks compatibility, then why is it marked as cherry-pick for 3.3? Shouldn't it only be 3.x at most?

In 3.3, debug mesh instances have been moved from being children of the CollisionShape nodes to children of the CollisionObject nodes. But it's causing issues as CollisionShape nodes now have unexpected siblings. We got several bug reports around that already.
So godotengine/godot#48175 can fix that in 3.3.1 without losing the original benefit (support for custom collision shapes).

The hack I've been using to retrieve debug mesh instances from the tree nodes in order to do custom drawing is more of an edge case. Even if it can be considered compatibility breaking in some way, it's probably fine to just use the new API instead when it's needed. I doubt many users will complain about it.

@aaronfranke aaronfranke merged commit e0db0b8 into godotengine:master May 19, 2021
@pouleyKetchoupp pouleyKetchoupp deleted the physics-tests-draw-shape-clean branch May 20, 2021 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants