[X3D-Public] Any way to do a 'LineSensor' (Like PlaneSensor but in one dimension)
Paul Aslin
fabricatorgeneral at yahoo.com
Wed Sep 22 16:49:55 PDT 2010
--- On Thu, 23/9/10, Dave A <dave at realmofconcepts.com> wrote:
> From: Dave A <dave at realmofconcepts.com>
> Subject: [X3D-Public] Any way to do a 'LineSensor' (Like PlaneSensor but in one dimension)
> To:
> Cc: "x3d-public at web3d.org" <x3d-public at web3d.org>
> Received: Thursday, 23 September, 2010, 8:27 AM
> I need to be able to drag objects
> along one dimension only, and I'd like the interaction to
> look natural too.
>
> A PlaneSensor can let you drag things, and restrict
> *movement* using the min/max fields (set them to the same
> value, say, 0).
>
> The problem is, they *detect* mouse movement in both
> directions, and arbitrary movement always produces some
> movement in both directions. The result is, for example,
> moving the mouse up/down the screen produces movement
> right/left in the object. This is bad.
>
> So, is there any way to restrict the detection of mouse
> movement? Is there a different type of sensor available. I'm
> using Contact, maybe they have something handy?
Just use a Script node to filter the output and set the unwanted value to zero.
Why to people on this list demand new nodes for something that can be solved with a few lines of scripting ?
More information about the X3D-Public
mailing list