Page 1 of 1

Custom Animation Frame Callback Events/Triggers & Creature Pack

Posted: Thu Jan 30, 2020 3:30 am
by pg_interactive
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

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

Posted: Thu Jan 30, 2020 4:55 am
by pg_interactive
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

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

Posted: Thu Jan 30, 2020 11:59 am
by chong
Hello,

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

Cheers