|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Rxel |
|
Old Version |
Published before Godot 3 was released. |
What I Know:
It is possible to load a collision mesh with open-collada (flags: -col / -colonly)
My Question(s):
Is it possible to load a OBJ or MSH file as a collision shape?
Can not find this option in the editor.
Is it possible to load it by GD-Script?
I’m also interested in how collision meshes work in Godot.
I opened the “3d/sat_test” demo but apparently collision meshes are already included in the scene, no particular file for them but “shapes.dae”. There is no doc about this yet on the website unfortunately…
Zylann | 2016-05-08 01:44
|
|
|
|
Reply From: |
GlaDOSik |
Is it possible to load a OBJ or MSH file as a collision shape?
No, it isn’t possible (import it as a coll. shape). You have to import your object as a 3D Scene. OBJ files use 3D Mesh option.
Can not find this option in the editor.
But you can convert it manually! Import your OBJ model/models as a 3D Mesh, create MeshInstance node, load imported .msh file, click on Mesh button (in the bar under tabs next to the View button) and choose Create Trimesh/Convex Static Body. Done.
Is it possible to load it by GD-Script?
I don’t think so.
I’m also interested in how collision meshes work in Godot.
Node CollisionShape needs a Shape, which is a Resource data type. Resources can be saved to files or built-in (packed in the scene). And they are documented right here. http://docs.godotengine.org/en/latest/tutorials/step_by_step/resources.html
Thank you for your answer!
That is what i have searched for.
The menu-botton is hidden in the 3D-Viewport header tabs.
I have not seen it, of course it´s only showing up when the
Mesh-Instance is selected in the Scene-Tab.
The 3D-Viewport is not a place where anybody would search intentonaly.
However, it is good to know where i can find it.
But how to I import somethin as a col shape?
Pidele | 2017-11-10 12:13