Geometry Nodes: Move cone primtive to rest on its base by default

This is generally what people expect when generating a cone. Note that
this translation currently happens after the rotation, but since the rotation
will likely be removed in the future, that won't be a problem for long.
This commit is contained in:
Hans Goudey 2021-03-19 11:21:24 -04:00
parent 97b83b6a67
commit dbe45073d2
1 changed files with 2 additions and 0 deletions

View File

@ -258,6 +258,8 @@ static void geo_node_mesh_primitive_cone_exec(GeoNodeExecParams params)
Mesh *mesh = create_cylinder_or_cone_mesh(
location, rotation, radius_top, radius_bottom, depth, verts_num, fill_type);
BKE_mesh_translate(mesh, float3(0.0f, 0.0f, depth * 0.5f), false);
params.set_output("Geometry", GeometrySet::create_with_mesh(mesh));
}