This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > July 2005 > disabling collision





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 disabling collision
john

2005-07-05, 11:31 pm

I'm developing VRML projects that must run with at least CosmoPlayer
and Contact5. Currently, when I view a project in Contact, I must
first select (via right-mouse-click) "Movement" then "Collision" to
disable collision. Otherwise, when I try to zoom into the models, it's
very slow/jerky and one of those ghostbuster red-circle-with-slash
things pops up. I'd like to get around this so users can view my
project with minimal headache. So, among other things, I've tried the
obvious:

#VRML V2.0 utf8

Collision {
collide FALSE
children [

-EXTERNPROTOs (dozens)
-IFS and other nodes (100s)
-scripts (100)

]
}

-ROUTEs (1000+)


I was surprised when this worked with Contact- i didn't think i could
wrap almost the whole thing--including scripts and EXTERNPROTOs--in the
Collision node. But now, unfortunately, Cosmo doesn't work at all.
In fact, Cosmo won't allow me to place even a single EPROTO within a
Collision node.

Solutions? ...without having to wrap, individually, all shape-nodes
within their own Collision node?

Joerg Scheurich aka MUFTI

2005-07-06, 11:30 pm

> #VRML V2.0 utf8

> Collision {
> collide FALSE
> children [


> -EXTERNPROTOs (dozens)
> -IFS and other nodes (100s)
> -scripts (100)


> ]
> }


> -ROUTEs (1000+)



> In fact, Cosmo won't allow me to place even a single EPROTO within a
> Collision node.


EXTERNPROTO definitions or EXTERNPROTO usage ?

For EXTERNPROTO definitions you should check, if the VRML standard allow
EXTERNPROTO definitions inside a MFNode field (like children)

so long
MUFTI
--
Dieses Programm stellt SCSI-Kennung gebrauchten auf Ihrer
Anlage fest und empfiehlt einen erhaeltlichen Kennung,
anschliessen ein NEUES Laufwerk.
Russ

2005-07-06, 11:30 pm

hi John,

Contact has a proprietory Browser extension that allows you to turn
on/off collision. You have to play the Browser getName game though:

Script {
field SFString foo ""
url "javascript:
function initialize(){
foo = Browser.getName();
// 0 is false 1 is true
if(foo=="blaxxunCC3D"){ Browser.setCollisionDetection(0);
}
}
"
}

tc
Russ Kinter

john

2005-07-06, 11:30 pm

hey russ,

thanks much- it works. fyi- to anyone who might use this snippet:
you'll want to change the double-quotes to single around
'blaxxunCC3D' (so you don't have nested double-quotes).

thanks again,
john

Braden McDaniel

2005-07-07, 4:35 am

On Tue, 2005-07-05 at 16:33 -0700, john wrote:
> I'm developing VRML projects that must run with at least CosmoPlayer
> and Contact5. Currently, when I view a project in Contact, I must
> first select (via right-mouse-click) "Movement" then "Collision" to
> disable collision. Otherwise, when I try to zoom into the models, it's
> very slow/jerky and one of those ghostbuster red-circle-with-slash
> things pops up. I'd like to get around this so users can view my
> project with minimal headache. So, among other things, I've tried the
> obvious:
>
> #VRML V2.0 utf8
>
> Collision {
> collide FALSE
> children [
>
> -EXTERNPROTOs (dozens)
> -IFS and other nodes (100s)
> -scripts (100)
>
> ]
> }
>
> -ROUTEs (1000+)
>
>
> I was surprised when this worked with Contact- i didn't think i could
> wrap almost the whole thing--including scripts and EXTERNPROTOs--in the
> Collision node. But now, unfortunately, Cosmo doesn't work at all.
> In fact, Cosmo won't allow me to place even a single EPROTO within a
> Collision node.


EXTERNPROTOs (and PROTOs) cannot be declared in the middle of a field
value. And IndexedFaceSet is a geometry node--it is not valid in the
"children" field of a grouping node (like Collision).

Cosmo is right for rejecting such code. Contact is wrong for accepting
it.

--
Braden McDaniel e-mail: <braden@endoframe.com>
<http://endoframe.com> Jabber: <braden@jabber.org>

Sponsored Links


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