Custom Animation Frame Callback Events/Triggers & Creature Pack

Discuss issues pertaining to the various game/web runtimes of Creature here.
Post Reply
pg_interactive
Posts: 25
Joined: Thu Feb 22, 2018 2:42 pm

Custom Animation Frame Callback Events/Triggers & Creature Pack

Post by pg_interactive » Thu Jan 30, 2020 3:30 am

Hi,

Whats the best way for me to go about adding Event Triggers support into CreaturePack?
I did notice, i can set the metada (with the eventTriggers data) into CreaturePackAsset.
Creature Pack github page states, that CreaturePack doesnt support GameController, which handles event callbacks for the default Creature plugin.

Just few words of where to look/add code would be appreciated. I'm fine to do my own implementation once i get some heads up.

Thank you

pg_interactive
Posts: 25
Joined: Thu Feb 22, 2018 2:42 pm

Re: Custom Animation Frame Callback Events/Triggers & Creature Pack

Post by pg_interactive » Thu Jan 30, 2020 4:55 am

I did some digging and so far i found that

1) to emulate
CreatureAgent::AnimationReachedEnd
i could intercept
CreaturePackModule::CreaturePackAnimClip::correctTime

2) to handle event triggers, meta file seems to contain always event frame and event name, so i could probably intercept
(handles both CreaturePackPlayer and CompositePlayer) CreaturePackRenderer::updateTime or
(deeper, only CreaturePackPlayer) CreaturePackModule::CreaturePackPlayer::stepTime
EDIT: i just noticed, you already load the metadata and process it in CreaturePackAsset::LoadMetaData - so that's nice in terms of parsing, and you parse eventTriggers in CreatureModule already, so its nice inspiration. Then just BuildFrameCallbacks, like you already do in CreatureGameController::BuildFrameCallbacks, execution, and should be good to go.

3) Also i have a question - what exactly are 'composite clips'?

Thanks

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: Custom Animation Frame Callback Events/Triggers & Creature Pack

Post by chong » Thu Jan 30, 2020 11:59 am

Hello,

CompositeClips allow you to chain several clips together I believe, but it's probably something you don't have to worry about.

Cheers

Post Reply