- Vector ep_pos = track->get_endpoint_position(j);
- float ep_dir = track->get_endpoint_direction(j);
- float c = cos(ep_dir);
- float s = sin(ep_dir);
- float dx = gpointer.x-ep_pos.x;
- float dy = gpointer.y-ep_pos.y;
+ Snap sn = i->object->get_snap_node(j);
+ float c = cos(sn.rotation);
+ float s = sin(sn.rotation);
+ float dx = gpointer.x-sn.position.x;
+ float dy = gpointer.y-sn.position.y;