Create a wide using OnDraw in network nodes
Some trig will be involved for this and the commands you will need are drawtomodelscale() and either drawrect, drawrectangle or drawquad(). (fglRotate() might also help)
You'll also want the other node coordinates relative to the current node for a given port :
Vec3 otherloc = current.outObjects[port].location.project(current.outObjects[port].up,current);
and then the angle from one node to another will be
Math.degrees(Math.atan2(otherloc.y,otherloc.x))
If you were using an up to date version the vector logic is much simpler:
double pathwidth=2; drawtomodelscale(current); for (int n=current.outObjects.length;n>0;n--) { Vec3 otherloc = current.outObjects.location.project(current.outObjects .up,current); Vec2 other2=Vec2(otherloc.x,otherloc.y); Vec2 unit=other2/other2.magnitude*pathwidth/2; Vec2 leftoff=unit.rotate(90); Vec2 p1=leftoff; Vec2 p2=-leftoff; Vec2 p3=p2+other2; Vec2 p4=p3+leftoff*2; drawquad(view,p1.x,p1.y,0,p2.x,p2.y,0,p3.x,p3.y,0,p4.x,p4.y,0,0,1,0); }
Hi @Raviraj V, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.
If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.