<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hello,</div><div class="gmail_quote"><br></div><div class="gmail_quote">I would like to get the picking position/object(shape) for a vertical ray. Is there a way to do this?</div><div class="gmail_quote">(Working on a map-to-x3dom interactions.)<br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote">The ray example (vertical from the sky):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">var from = new x3dom.fields.SFVec3f(any_x, 1000, any_z);</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">var dir    = new x3dom.fields.SFVec3f(0, -1, 0);</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">var ray = new x3dom.fields.Ray(from, dir);</blockquote></div><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote">a. There's a <i>elem.runtime.shootRay(cx,cy)</i>; It works but it's bound to the canvas = the shape has to be in the view.</div><div class="gmail_quote"><br></div></div><div class="gmail_quote">b. Tried to access the scene and run <i>doIntersect()</i> - it does not work:</div><div class="gmail_quote"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">scene = <i>elem.runtime.canvas.doc._scene;</i><br>var isect = scene.doIntersect(ray); // isect returns true but the hitPoint is incorrect at least for my model.</blockquote><div class="gmail_quote"><br></div><div class="gmail_quote">Comment: the shapes do not have DEFs. Trying to understand the from the source if it's important.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Thanks.</div><div class="gmail_quote"><br></div><div class="gmail-m_-6093276966298453430m_7318950759479868083gmail_signature">Best regards,<br>Oleg Dzhimiev<br>Electronics Engineer<br>phone: +1 801 783 5555 x124<br>Elphel, Inc.<br></div>
</div></div>