<div dir="ltr">There's a ProximitySensor node (under 22 Environmental Sensor in the specs) which can tell you where your ViewPoint is and what angle it is.<div>You can ROUTE translation from the ProximitySensor to a Transform that wraps your coordinate axes. That will keep them positioned relative to the viewpoint as you navigate (without rotating them - leaving them coordinate system aligned)</div><div>-Doug</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 12, 2024 at 11:33 AM Hans Moritz Guenther via x3d-public <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
<p>I'm trying to put a reference coordinate system (x, y, z) arrows
onto my scene, such that they are always visible at e.g. the
bottom left corner.</p>
<p>I found
<a href="https://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/CoordinateAxesX3dDISIndex.html" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/CoordinateAxesX3dDISIndex.html</a>
which makes the x,y,z arrows and then it promises "<font size="+1">See
CoordinateAxesExample for use as an Inline coordinate-system
reference frame.". That seems to be pretty close to what I'm
looking for. Unfortunately, I can't locate the CoordinateAxis
example; it's not in the list of examples for this chapter
(<a href="https://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/index.html" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/index.html</a>).</font></p>
<p><font size="+1">Can you point me to that example or a different
setup that might give me what I need?</font></p>
<p><font size="+1"><br>
</font></p>
<p><font size="+1">The closest I've found is the ViewFrustrum
example, as in "features get moved relative to the viewpoint"
but in that case, the coordinates of the lines are re-calculated
at every step, while my case seems simpler and I'm hoping that
it can done with just ROUTE to set the origin of a TRANSFORM
node, which contains the x,y,z arrows, relative to the viewpoint
coordinates. However, I've not been able to figure that out yet
- maybe I'm not connecting to the right properties (see code
example below). </font>I see the arrow, but it's not moving
when I'm moving the camera, so it's going out of view when I look
elsewhere. Instead, I would have expected it to always sit right
on top of the camera. (In the end, I obviously want it to be at
some constant distance from the camera, but if I can't figure out
how to connect the location of the arrow to the location of the
camera at all, then I don't have to worry about those details
yet.)</p>
<p>Thanks for any advice,<br>
</p>
<p>Moritz<br>
</p>
<div style="color:rgb(59,59,59);background-color:rgb(255,255,255);font-family:Menlo,Monaco,"Courier New",monospace;font-weight:normal;font-size:12px;line-height:18px;white-space:pre-wrap"><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Transform</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">translation</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'-2 0 0'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">DEF</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">"arrow"</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Collision</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">DEF</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'DoNotCollideWithVisualizationWidget'</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Group</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(0,128,0)"><!-- Vertical Y arrow and label --></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Group</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">DEF</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'ArrowGreen'</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Shape</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Appearance</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">DEF</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'Green'</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Material</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">diffuseColor</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'0 1 0'</span><span style="color:rgb(128,0,0)">></</span><span style="color:rgb(205,49,49)">material</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"></</span><span style="color:rgb(205,49,49)">Appearance</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Cylinder</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">DEF</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'ArrowCylinder'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">radius</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'.025'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">top</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'false'</span><span style="color:rgb(128,0,0)"> /></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"></</span><span style="color:rgb(205,49,49)">Shape</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Transform</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">translation</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'0 1 0'</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Shape</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Cone</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">DEF</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'ArrowCone'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">bottomRadius</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'.05'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">height</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'.1'</span><span style="color:rgb(128,0,0)"> /></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Appearance</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">USE</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'Green'</span><span style="color:rgb(128,0,0)"> /></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"></</span><span style="color:rgb(205,49,49)">Shape</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"></</span><span style="color:rgb(205,49,49)">Transform</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"></</span><span style="color:rgb(205,49,49)">Group</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"></</span><span style="color:rgb(205,49,49)">Group</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"></</span><span style="color:rgb(205,49,49)">Collision</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"></</span><span style="color:rgb(205,49,49)">Transform</span><span style="color:rgb(128,0,0)">></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">Viewpoint</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">description</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'Overview'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">orientation</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'0 1 0 3.141592653589793'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">position</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'5 5 0'</span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">viewAll</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'true'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">DEF</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'viewall'</span><span style="color:rgb(128,0,0)"> /></span></div><div><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(128,0,0)"><</span><span style="color:rgb(205,49,49)">ROUTE</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">fromNode</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'viewall'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">fromField</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'position'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">toNode</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'arrow'</span><span style="color:rgb(59,59,59)"> </span><span style="color:rgb(229,0,0)">toField</span><span style="color:rgb(59,59,59)">=</span><span style="color:rgb(0,0,255)">'translation'</span><span style="color:rgb(128,0,0)"> /></span></div></div>
<p></p>
</div>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>