-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add Root body type for collision generation #3355
Comments
An option like this sounds useful, but maybe as a separate option rather than body type? It could be used for Static and Area types as well. |
You may have misunderstood me. At the moment the |
@Shatur You're correct, I thought you were proposing to automatically set the node type to RigidBody on the root as well. If it's just meant not to set any physics node, yes it does make sense to make it a body type. I'm not so sure about making this option the default though, since it requires an additional step to make it work in physics (you need to change the root node to a physics node afterwards). Otherwise it might look like it's not working by default. The most common use case for this workflow is making static bodies out of meshes, so I'd like to make sure we keep this case straightforward. Rigid bodies are a bit more of an edge case, generally you set one primitive manually for them instead of using the more detailed mesh, for performance reasons. |
Yes, you are right. But on the other hand, it is more convenient to work with such a node, because in this case it is a physical object. Also scenes will be better organized - it will be immediately visible which physical object each imported node represents (compared to just using |
Yeah, I wonder if we could actually change the workflow a little bit and have:
|
Describe the project you are working on
A third-person shooter.
Describe the problem or limitation you are having in your project
Let's imagine I want to create a physics-enabled object. I have two options:
Both workflows above are inconvenient.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose a simple change: add additional "Body type" called "Root". In this case, the generated collision will be added as children to the root scene. This way users will be able to use generated collision for the root scene, the type of which they can select in the import settings (this functionality already available since 3.x).
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
We have "Body type" with "Static", "Dynamic" and "Area". I suggest adding a new "Root" option, which will be first in the list, to make it the default, because I think that this workflow is better in general.
In this case, your root scene will represent the actual type and the collision objects will be added as children with no intermediate objects. It will be convenient to interact with it (for example, apply force or take coordinates) and you will also have less objects:
Before
After
If this enhancement will not be used often, can it be worked around with a few lines of script?
The user can write his own custom import script, which will add a collision by a special prefix in the name as a child of the main scene.
Is there a reason why this should be core and not an add-on in the asset library?
I think this is a very simple feature that will greatly improve the usability of import workflow.
The text was updated successfully, but these errors were encountered: