New to api
Say I have two vertices with the same x and y coordinates, but different z coordinates. Treating these two coordinates as an infinite line or vector, is there a method - through attribute search or otherwise - to select any polygons that intersect the resulting line? In other words, is there a function that can select any polygons below these two coordinates?
Basically, we are trying to write a limited ‘project object’ tool where the two sides of the billboard polygon (green) will touch the exact terrain polygon underneath. Since the two terrain polygons underneath (in red) are not on the same plan the projected billboard will be skewed.
Apologies if this is not the right form, please direct me to the right form.
There is no single tool to do this for you. If you have a large number of faces to move like this, a script is the best bet. It will be complicated to write as you have to do all the intersection math yourself, but it is very possible.
If you are just doing a small number of items, then there is a workflow you can use. Try this:
Select one edge of the square to move
run "track plane from face" tool
select the face under the edge
ctrl + t to run translate tool
middle mouse click the bottom vertex as the from point
check the freeze x and y flags
left click anywhere to specify the bottom point on the face
Repeat this entire process for the other edge
It sounds like a lot, but it is really quick to do. This works because the freeze flags won't let the x and y change while specifying the second point. The track plane from face tool will set the grid to be in the same plane as the polygon selected. so clicking anywhere will force to be on that grid, and the freeze flags will force to be the point directly under the point you middle mouse referenced.