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
Custom Animation Frame Callback Events/Triggers & Creature Pack
-
- Posts: 25
- Joined: Thu Feb 22, 2018 2:42 pm
-
- Posts: 25
- Joined: Thu Feb 22, 2018 2:42 pm
Re: Custom Animation Frame Callback Events/Triggers & Creature Pack
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
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
Hello,
CompositeClips allow you to chain several clips together I believe, but it's probably something you don't have to worry about.
Cheers
CompositeClips allow you to chain several clips together I believe, but it's probably something you don't have to worry about.
Cheers