kestrelm / creature_unity Goto Github PK
View Code? Open in Web Editor NEW2D Skeletal Animation Unity Runtimes for Creature
Home Page: http://creature.kestrelmoon.com/
License: Apache License 2.0
2D Skeletal Animation Unity Runtimes for Creature
Home Page: http://creature.kestrelmoon.com/
License: Apache License 2.0
CreatureRenderer.SetActiveAnimation() needs to call creature_manager.SetAutoBlending(false);, otherwise if you blend two animations, and later call SetActiveAnimation in order to do a non-blending transition, it will loop the previously blended animation improperly (since blending will still be set to true) instead of using the new animation you set.
In CreatureGameController.cs:
public static event eventTrigger OnEventTrigger;
This needs to have the "static" tag removed from it. With static enabled, if you ever have multiple Creature-animated sprites in the scene, you will have events triggering on all of them when it's triggered for a single instance. Without static, it properly triggers on a single Creature instance.
global_uvs[i + 1] = global_uvs[i + 1];
something is wrong there...
Hello! Like most of game studios we have this problem using Creature:
We have a character with 4 animations : a "Run" animation, a
"Jump"animation, a "Shoot with Gun" animation and a "Shoot an arrow with
elbow" animation.In theory we should make the animation Run( or jump) being OVERWRITTEN by
the animation " Shoot with gun" JUST for the arms whenever it happens at
any time! Usually this is achieved with the Layers in Mecanim in Unity.
But How Can I manage this situation? You don't have any tuturial about
it, in your tutorial you simply blend between two animations which is
almost never the case in games where you need to change the shooting
weapon.How can we address this? Thank you very much.
// Sets an override opacity/alpha value for a region
public void SetOverrideRegionAlpha(string region_name_in, float value_in)
{
region_override_alphas[region_name_in] = value_in;
}
public void SetActiveItemSwap(String region_name, int swap_idx)
{
active_uv_swap_actions[region_name] = swap_idx;
}
It has been added the functionality of overriding an animation for certain bones ( useful in runner games, where we have a layer for the arms shooting and the lower layer for the body) but this is accessible only via code.
In unity in mecanim there is already a Layer system where one can set Override/Additive layer where you can set the animation on different layers and it the upper layer has an animation just for the arms it will automatically override the animation for the arms at the lower layer.
It would be cool to make use of this in mecanim instead of the code.
In the CreatureFrameCallback class, this line:
if((int)Math.Round(frameIn) >= frameIn)
needs to be changed to:
if((int)Math.Round(frameIn) >= frame)
Otherwise, animation events trigger randomly/sporadically, instead of at the intended time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.