#Animal Growth over a period of time.

1 messages · Page 1 of 1 (latest)

kindred temple
#

I'm planning to add animal growth to my game over time, and I'm wondering how I can achieve this. For example, a baby animal goes through different stages while growing in size. Thanks!

magic quartz
#

There are two cases, and they depend on your game.
For every animal that is loaded in memory, you can simply use FixedUpdate. However, if you have many animals, you may want to implement a system that only grows a portion of all animals at a time.
For animals that are not loaded, if your game has multiple levels or uses streaming chunks, you can store a timestamp of their birth and use your logic to handle their growth when they are loaded.

#

Be aware this could be CPU intensive if growth isn't handled correctly.

kindred temple
magic quartz
#

You can create a animation from your baby model to your adult model (could difficult if your models are too different) and change the model at the end of the animation. Unity works with blend shapes for examples.

#

You just need to add a growth increment and start the animation when growth reachs the threshold.

kindred temple
brazen mason
#

The latter is much easier and generally what games do

kindred temple
magic quartz
#

I am not sure that unity blendshape support additive animation with other bone animation. Otherwise, you can just use very small step.

kindred temple
magic quartz
#

Nope, you can also modify your model vertice with your own code, but if your model is not simple, created with blender or 3ds max, you are in hell.

errant blade
#

There are always other ways. Personally I would just swap out prefabs at the various stages

kindred temple
kindred temple
magic quartz
#

Blend-shapes is the best method to animate the growth. Not sure if it supports additive change and keep the model useable.

#

Like evilotaku said, if you don't master the suject take the easiest route of just swaping model.