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

Static body scaling disable all collision in escene #43275

Closed
CHIESOFTWARE opened this issue Nov 2, 2020 · 3 comments
Closed

Static body scaling disable all collision in escene #43275

CHIESOFTWARE opened this issue Nov 2, 2020 · 3 comments

Comments

@CHIESOFTWARE
Copy link

Godot version:
3.2.3

OS/device including version:
Ubuntu studio 20.04

Issue description:
I created a scene with a tree, the tree contains a static body with collision. The idea is that the tree is scaled according to its growth.

Use that same mechanic to create more trees

I created several instances of these different trees in the main scene,

The problem is that once the static body is scaled, the collisions in the whole scene stop working, even the collisions of platforms and other nodes that have nothing to do with the tree.

The error only occurs if there are several trees of different types, with a single type of tree nothing happens.

Try creating trees one by one without duplicating anything (scenes, mesh, statc body). But nothing worked

My solution was to scale only the collision shape and not the static body, for this I had to separate the static body from the mesh in order to scale the mesh and the collision shape without touching the static body.

Steps to reproduce:

  1. Create a scene for the tree
  2. create a mesh with the tree model (I used a tree object from kenney.nl)
  3. create a static body either using the mesh button in the menu or doing it manually, the error occurs in both cases.
  4. Create another scene with another tree and repeat the process.
  5. create main scene, with player (kinematic body, with collisions)
  6. Add trees of different types to the main scene and create a script where the trees are scaled by manipulating the mesh and the static body, not the whole scene. (I used a timer to call the scaling function)
  7. Remember to add a platform to pose the player and the trees.

Minimal reproduction project:
Just start the main scene called world.

minimo_error.zip

@Calinou
Copy link
Member

Calinou commented Nov 3, 2020

cc @madmiraal

@madmiraal
Copy link
Contributor

This sounds like the scaling to 0 problem (#32405, #41031, #40952) which was fixed with #41426, which was cherry-picked for 3.2.4.

@CHIESOFTWARE please test with 3.2.4.beta1 and confirm that the problem has been resolved.

@CHIESOFTWARE
Copy link
Author

@madmiraal is fixed in the beta of godot 3.2.4, is working fine. Thanks

@Calinou Calinou closed this as completed Nov 4, 2020
@Calinou Calinou added this to the 3.2 milestone Nov 4, 2020
@Calinou Calinou added the bug label Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants