<HTML>
<HEAD>
<TITLE>Re: [X3D-Public] Any way to do a 'LineSensor' (Like PlaneSensor but in one dimension)</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12pt'>Because people do not know (always) how to do scripting... It’s a learning process...<BR>
pc<BR>
<BR>
Le 10-09-22 19:49, « Paul Aslin » <<a href="fabricatorgeneral@yahoo.com">fabricatorgeneral@yahoo.com</a>> a écrit :<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12pt'><BR>
<BR>
<BR>
--- On Thu, 23/9/10, Dave A <<a href="dave@realmofconcepts.com">dave@realmofconcepts.com</a>> wrote:<BR>
<BR>
> From: Dave A <<a href="dave@realmofconcepts.com">dave@realmofconcepts.com</a>><BR>
> Subject: [X3D-Public] Any way to do a 'LineSensor' (Like PlaneSensor but in one dimension)<BR>
> To:<BR>
> Cc: "<a href="x3d-public@web3d.org">x3d-public@web3d.org</a>" <<a href="x3d-public@web3d.org">x3d-public@web3d.org</a>><BR>
> Received: Thursday, 23 September, 2010, 8:27 AM<BR>
>  I need to be able to drag objects<BR>
> along one dimension only, and I'd like the interaction to<BR>
> look natural too.<BR>
><BR>
> A PlaneSensor can let you drag things, and restrict<BR>
> *movement* using the min/max fields (set them to the same<BR>
> value, say, 0).<BR>
><BR>
> The problem is, they *detect* mouse movement in both<BR>
> directions, and arbitrary movement always produces some<BR>
> movement in both directions. The result is, for example,<BR>
> moving the mouse up/down the screen produces movement<BR>
> right/left in the object. This is bad.<BR>
><BR>
> So, is there any way to restrict the detection of mouse<BR>
> movement? Is there a different type of sensor available. I'm<BR>
> using Contact, maybe they have something handy?<BR>
<BR>
Just use a Script node to filter the output and set the unwanted value to zero.<BR>
<BR>
Why to people on this list demand new nodes for something that can be solved with a few lines of scripting ?<BR>
<BR>
<BR>
     <BR>
<BR>
<BR>
_______________________________________________<BR>
X3D-Public mailing list<BR>
<a href="X3D-Public@web3d.org">X3D-Public@web3d.org</a><BR>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>