[x3d-public] HUD Proto example clarification

Don Brutzman brutzman at nps.edu
Mon Oct 24 14:37:08 PDT 2016


On 10/24/2016 7:41 AM, Andreas Plesch wrote:
> Looking for nice Protos to check out, I came across the HUD proto here:
>
> http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14-Prototypes/HeadsUpDisplayPrototypeIndex.html

Thanks for the feedback.  Several side-effect issues noticed/fixed/uploaded.

Must say that Cobweb response is excellent, with no apparent jerkiness whatsoever when navigating.  Far better than some players I've seen - for example BS Contact is very wiggly.  Instant Reality is OK (but it neglects to load the relative image for a nearby Inline when running on localhost).

	http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14-Prototypes/HeadsUpDisplayExampleCobweb.html

> Comments explains that its screenOffset field is the offset position for HUD relative to current view location.
>
> But, in fact, screenOffset seems to be the offset relative to the local coordinate system within which the ProtoInstance is used. For example, the example instance has a Z offset of -5 which puts it (sensibly) in front of the current viewpoint at -10, not behind it at -15.
>
> Is that understanding correct ?

Yes.  The appinfo for screenOffset assumes that the HUD is at the top level of the scene, and the current view location is wherever the user has navigated.  So the screenOffset is in that local coordinate system.

Suggestion for a better description?  Perhaps a warning to avoid nesting?

Meanwhile the other example has a "twist in the knickers" - aha incorrect ExternProtoDeclare reference - now fixed.

	http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter14-Prototypes/HudKelpForestIndex.x3d

These changes are checked into sourceforge... some delays uploading, will likely occur later tonite.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list