Set skeletonModelURL in AC playback?


#1

I’ve added https://7mv1ptvrbi5wq61rlfll.g0v.sandcats.io/01recording-taipei/00-demo-rotate-jump.js as a persistent script, slightly modified from the standard recordingPlayback.js :

Avatar.skeletonModelURL = modelFile;

However, it seems to have no effect; the AC still assumes the default avatar.

I see in http://jsref.docs.highfidelity.com/docs/avatar-api-overview this note:

# Setting the avatar's model
Need to update this section*

Is there a way to set model from within an AC script?


#2

Hi @audreyt!

Took a peek at the 00-demo-rotate-jump.js script you posted. Can you make sure that Agent.isAvatar = true happens before you change the other Avatar properties?

I believe that the call to set skeletonModelURL may be silently failing because at that point in time isAvatar is false.


#3

Thanks! I did the change (and made sure the URL was cached) but it is still not applying.

Moreover, the head/hand movements in the recording seems to be discarded; only rotation and translation seem to be present in the playback. Is this as intended, and if I’d like to contribute a fix, where should I look into?


#4

I know that the recording code has not been looked at in a while, it is possible that something in the joint tracking or playback is no longer working properly and will need to be updated.

Looking again at the script I wonder if Recording.setPlayerUseSkeletonModel(true); is not what is causing problems. When you recorded which skeleton model URL was being used?

In theory without that line it should abide by what you have passed for .skeletonModelURL.


#5

Thanks for your help! Unfortunately that does not seem to work.

It’s fine for now — I just started another instance on a separate laptop.

Still, would be great to update http://jsref.docs.highfidelity.com/docs/avatar-api-overview#section-setting-the-avatar-s-model when there is a way around this issue.