Previous Next Index Thread

Re: PlaneSensor

Hi Hirohisa,
Hi Uma,

Sorry for the confusion. If you try this piece of code you 
will realize that the Sphere will not move along the rotated 
coordinate system because the coordinates created by the 
PlaneSensor have a fixed Z value.

DEF planeSensorTransform Transform {
        translation 2 2 -5
        rotation 1.2 1.210 1.01 0.79
        children [
             DEF sphereShape Shape {
                 geometry Sphere {}
             }
             DEF boxShape Shape { # this node is just to
                  geometry Box {  # see the rotation better
                      size 10 10 0.01
                  }
                }
                DEF planeSensor PlaneSensor {
                        offset 2 2 -5
                }
        ] 
	ROUTE planeSensor.translation_changed TO 
	    planeSensorTransform.set_translation
}

I want to go around an object rotate the planeSensor of that object
according to the position of the avatar and I want to be able to 
move the object like if I had PlaneSensor perpendicular to the line
of sight.


The problem: I can't use a SphereSensor because this is not implemented

So I thought that I can use a PlaneSensor and rotate according to 
the avatars position (which I get from a ProximitySensor) and will 
still get the same effect. 
Nope!

My intention of that mail is to make clear that nobody can use a
PlaneSensor if he rotates it.
Imagine you build a big box, you are inside the box and you want to
move objects only on the "walls". If you use a SphereSensor
you always get a "PlaneSensor" perpendicular to your line of sight.
If you use a PlaneSensor it works fine for the wall in the XY planes
but not for any other planes! 

My personal opinion is that the guys who wrote the specification did
think of that but didn't have a solution because of the 
fact that you can have 2D and 3D devices.

My objective is to start a discussion about the usefulness of a
rotation field (similar to the offset field) in a PlaneSensor.

THANKS a lot for YOUR responce and help
Michael 

PS: Is there a browser that supports SphereSensors?


On Fri, 21 Feb 1997, Rikk Carey wrote:

> Nope.  The offset field has nothing to do with positioning (or
> orienting) 
> the sensor.  Rather, if autoOffset is TRUE the offset field is added to
> the results of the sensor's output (e.g., translation_changed for
> PlaneSensor, rotation_changed for SphereSensor). 
> 
> This feature provides the ability to give you persistent sensors.  This
> means that they will accumulate their results each time you twiddle it,
> rather than reseting back to their original state. 
> 
>
> This is subtle.  I recommend that you experiment with it by setting
> autoOffset to FALSE (do a test) and then set autoOffset to TRUE (do a
> test).  In simple cases, you will typically ignore the value of the
> offset field itself (the sensor uses it internally). 


On Fri, 21 Feb 1997, Uma Menon wrote:  Michael Paulitsch wrote:  
> If i have
> understood it right, cant you achieve the same result
> by specifying another SphereSensor (with desired offset) with it?
> sensors.
> This means that they will accumulate their results each time you twiddle
> it, rather than reseting back to their original state.  Hope this
> helps... 




On Fri, 21 Feb 1997, Hirohisa Hirukawa wrote: 
> > IF I AM WRONG please show me a simple example with a rotation of 
> > an object that can be moved using a PlaneSensor.  
> > 
> I'm not sure if you are right or wrong, but at least I belive 
> we can rotate an object by a CylinderSensor or a SphereSensor.  
> Why do you absolutely want to use the PlaneSensor to rotate 
> an object?  
> 
> > PS: I am working with CosmoPlayer! I don't know how other browsers 
> > interprete PlaneSensors! 
> 
> It's true that CosmoPlayer for PC supports a PlaneSensor only, 
> and neither CylinderSensor nor SphereSensor.  
> 
> Did I understand what you intended to ask ?  

--- Michael PAULITSCH ---------- http://www.crhc.uiuc.edu/~michael/ ---




-------------------------------------------------------------------
*** Please send administrative requests to <majordomo@sdsc.edu> ***
-------------------------------------------------------------------

Follow-Ups:

References: