liming,

The solution is simple. It is true: the only thing that can be added to a
live scene is a branch group. But that is not as restrictive as it may seem
at first because you can add anything to the branchgroup while it is still
not live and then add the branch group to the live scene. So, assuming you
have set the correct capabilities on your avatar, you can add a behavior to
the avatar by attaching the behavior to an unlive branchgroup and then
attaching the branchgroup to the avatar.

required capabilities are: Group.ALLOW_CHILDREN_EXTEND,
Group.ALLOW_CHILDREN_WRITE, Group.ALLOW_CHILDREN_READ

Raffi

-----Original Message-----
From: Liming CHEN [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 2:01 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] add behaviour to a live scene


Hi,

Is it possible to add a behaviour to a live scene?

This problem comes from:

I create an avatar and make it live in the virtual world , then later
through interface
(button or menu) I  would like to add some behaviour to the avatar. I have
tried it but
there is a message displaying that "RestrictedAccessException - only a
BranchGroup node
can be added".

I can create a static avatar without behaviour and the same avatar with
behaviour; First
show the static avatar, when we want to show some behaviour of the avatart.
Wwe  detach
the static avatar and add another BranchGroup containing the behavioring
avatar.
However, I think there should be a direct way that an avatar can act
directly from
static posture.

Can anyone give a clue?

thanks

liming

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to