mirror of
https://github.com/godotengine/godot.git
synced 2025-02-11 21:30:56 +00:00
Added snapping to 3D path handles to bring it in line with its 2D counterpart
This commit is contained in:
parent
bbc71083c1
commit
4d1acab79b
@ -103,6 +103,12 @@ void PathSpatialGizmo::set_handle(int p_idx,Camera *p_camera, const Point2& p_po
|
|||||||
|
|
||||||
if (p.intersects_ray(ray_from,ray_dir,&inters)) {
|
if (p.intersects_ray(ray_from,ray_dir,&inters)) {
|
||||||
|
|
||||||
|
if(SpatialEditor::get_singleton()->is_snap_enabled())
|
||||||
|
{
|
||||||
|
float snap = SpatialEditor::get_singleton()->get_translate_snap();
|
||||||
|
inters.snap(snap);
|
||||||
|
}
|
||||||
|
|
||||||
Vector3 local = gi.xform(inters);
|
Vector3 local = gi.xform(inters);
|
||||||
c->set_point_pos(p_idx,local);
|
c->set_point_pos(p_idx,local);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user