Godot Version
4.5
Question
How can i add a specific model to a path node without making it with a CSG Polygon Node? I’m trying to make a ski lift and am going to use it to space out poles and put the wires in place.
Godot Version
4.5
Question
How can i add a specific model to a path node without making it with a CSG Polygon Node? I’m trying to make a ski lift and am going to use it to space out poles and put the wires in place.
You want to distribute objects along the path?
i want to distribute the poles i made evenly but i want the wire to be on the path the whole time if that makes sense.
This is a good video that’ll show you how to place the poles https://www.youtube.com/watch?v=Gfpnxg-jne4
I have watched the video but it didn’t mention how I could use my own model I made in blender
Instead of using a Box mesh you should be able to apply your model to the MultiMeshInstance3D.
Edit: To be clear in the “Creating a Plank Mesh” section of the video at ~2:30
I added my model and copied the code for the planks or in my case posts and wires and couldn’t get it to work.
It’s not obvious from your screenshots what could be wrong.
Here are some ideas to debug:
_update_multimesh function to make sure it runs_update_multimesh in the editorWhat is your “model”? Make sure you’re working with just a mesh resource and not a whole scene you get when importing gltf for example. Multimesh instance can only instantiate meshes.
And yeah, as already said, make it work with cubes first.
For some reason I didn’t think of this until I read this reply.
You don’t need to use the multimesh at all, you can just instantiate a new instance of your model at each transform instead. The multimesh is really just an optimisation, which might not be required if you are only rendering a “few” posts.
Sure but if OP was strictly following the tutorial, it’d be easier for them to do as the tutorial says for start.
I’d personally go with plain scene instancing, and then eventually optimize to multimesh if the model itself is static and you need to instantiate many of them as might be the case with long railroads.
Thank you all sooooo much! I looked closer at the code and found a small error, this may seem like a silly question but i am not great at godot yet so how could i rotate my mesh 90 degrees, i tried just using the override option in the multimesh but it turned the meshes and started not following the line.
You need to call set_instance_transform() on the MultiMesh resource object.
You need to set the correct values on the Basis that you pass to set_instance_transform. the video explains how to set the values to align to the direction and curve of the path.
If the models are 90 degrees off, you can either rotate the model and reimport or adjust the basis by to compensate.
Thanks again and sorry for the silly questions.
I should have paid better attention! Is there a way i could do it for scale b/c i tried some things but none worked. I could just make it smaller in blender and then reimport it but I feel it may be a good skill to learn, I could be wrong though. I tried this and it was by far the closest i got. basis.scale = basis.scale(Vector3(0.2, 0.2, 0.2)) Thanks Again!!
You are correct it is a good skill to learn, and embarrassingly its not something I’ve spent the time learning! The official docs are probably a good place to start Matrices and transforms — Godot Engine (stable) documentation in English
Having said that, I think in this case resizing the model in blender is a better choice. You are going to have a much simpler time if you create your models at the correct size in the first place e.g. use one unit as 1 meter in both Blender and Godot.
Edit: If you do want to mess around with scaling and can’t figure it out, I’d suggest asking a new question as other people with more knowledge will be able to help.