This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > March 2004 > Is this just a bug in VRML?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Is this just a bug in VRML?
Mohammad Khan

2004-03-18, 2:35 pm

Can someone please have a look at the code below, when using the code below
for a plane sensor it makes the PROTO Goal object hard to control (moves to
quick) and when offset is commented out the object is placed in the center
of the world. Can any explain why this happens.

Mo.


PROTO Goal [
exposedField SFVec3f position 0 0 0

]
{
Group {
children [

DEF GoalSensor PlaneSensor {
maxPosition 100 100
minPosition -100 -100
offset IS position #when clicked position is position
enabled TRUE # objects cannot be moved
}
]
}
}


Joerg Scheurich aka MUFTI

2004-03-18, 3:30 pm

> Can someone please have a look at the code below

It looks like, this is not the part of the code, that is causing problems...

> ... and when offset is commented out the object is placed in the center
> of the world.


Possibly, you made something similar to the following (translation is
overwritten, you may need a additional Transform here):

#VRML V2.0 utf8

DEF Transform1 Transform
{
children
[
Shape
{
appearance Appearance
{
material Material
{
}
}
geometry Sphere
{
}
}
DEF PlaneSensor1 PlaneSensor
{
}
]
translation 4.780868 0 0
}

ROUTE PlaneSensor1.translation_changed TO Transform1.set_translation
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews