a3davater

14 views
Skip to first unread message

ahmad2...@yahoo.com

unread,
Jan 19, 2012, 9:28:50 AM1/19/12
to Activate3D-ICM
greeting

i am trying to make avatars at run time i managed to map them to the
a3davater script and and T-poseing at run time everything but the
thing that even if i use InitializeBoneTransformsFromCurrentState()
after the mapping it's dosen't do the trick for me but i have tried to
click aligned skeleton button at run time it works :(
so why the calling of the function is not working for me












Dan

unread,
Jan 19, 2012, 5:50:21 PM1/19/12
to Activate3D-ICM
Ahmad,

The preferred way to achieve this is to use the AvatarModels array.
For each avatar type that you need, create that avatar in the editor
in some area where they are not visible. Add this avatar to the Avatar
Models array. At runtime, instantiate a copy into the Avatars array.
This will allow you to initialize the models in the editor correctly
but instantiate them dynamically at runtime.

Here's an example that just instantiates avatar model 0 at runtime.
However, you could easily do this based on a string lookup from XML or
some other, dynamic method.

Session.Avatars.Clear();
Session.Avatars.Add((GameObject)Instantiate(Session.AvatarModels[0],
Vector3.zero, Quaternion.identity));

dba

On Jan 19, 9:28 am, "ahmad2382...@yahoo.com" <ahmad2382...@yahoo.com>
wrote:

Alex

unread,
Mar 9, 2012, 1:59:47 PM3/9/12
to Activate3D-ICM
Where can I find the a3davatar source code you are talking about?
I can't find it on your website.

Thank you.
Best regards,
Alex

Dan

unread,
Mar 13, 2012, 1:45:06 PM3/13/12
to Activate3D-ICM
A3DAvatar is defined in A3DAvatar.cs which is in the scripts subfolder
of the Activate3D package.

The instantiated avatar and the models array are both on the session
as shown in the snippet above. Both are defined in
A3DBaseActivateSession.cs in the same folder.

dba
Reply all
Reply to author
Forward
0 new messages