Hey, I was trying to create a super simple animation of a 3d “hand”, its just a cylinder and when I was rotating the hand around the Y axis, to creat kinda attack animation it rotated around the center, I tried googling, asked chat gpt and couldn’t find a good answer to how I change the pivot point, can you help me, or point to the documentation?
I know it can be set up in 2D, but I’m not sure if a similar tool exists in a 3D editor. It will probably be easier to change the origin in Blender and export the model to Godot.
Simplest way to do that is to make it a child of another Node3D, and offset its local position and rotation to where you want it. Then when you rotate your parent Node3D, it should mimic having the pivot point offset.
That works really well - except when you are building a MeshLibrary to use with a GridMap. Godot apparently examines the mesh as-is. You have to define the origin / pivot point in an external 3D program, which is not a big deal if that is the way the mesh asset was created. Actually I hope I’m wrong, but I haven’t been able to find af way to do it, and I don’t see it mentioned in any forums.
I think the Godot-team has prioritized important matters, that don’t have other solutions - and fair enough.
Meshes don’t have “pivot points”. The origin is always implicit at 0,0,0 in local transformation space. The only thing you can do is offset all of their vertices.
Yes, to create MeshLibrary for Gridmap really depends on things like what type of game you’re doing, how you want to place your mesh, what Gridmap size you’re working with…etc.
For my example, I’m doing a 3D side-scroller and I edit my Gridmap in Z-axis and work with the cell size of 1, and my floor level is on Gridmap’s level-0. Now in Blender I kept origin as is (0,0,0) and had to offset my block’s vertices like this.
In order to match with the Godot grid I had to move vertices grid by grid in Blender and kept exporting to Godot to see the result. Challenging but doable.