- Home /
Fatten character
I am making a pac man meets fat princess type game where a character goes through a maze and if they eat certain foods it makes themselves fatter.
I am not sure what the best way to make a character grow progressively fat is. This is not the largest part of the game objective so I do not want it to be too resources intensive.
What is the best way to make the character get progressively fatter?
I am using blender for the modeling.
Thanks for the help, Kyle King
Answer by AngryOldMan · Apr 13, 2011 at 04:44 PM
by scripting it's scale to increase when you pick something up something like
in the Update
function check if you have activated your pickup, then call a function outside the update function with transform.localScale += expand
and add a vector3 variable for how much you want it to expand by. I have the code to do this but I would like to see you make an attempt at it 1st. Here is the script reference for transform local scale
The script that I did is:
function Update () { if(Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.F)){ transform.localScale += Vector3(0.001,0,0.001); } }
Is this how you did it?
Answer by DanjelRicci · Apr 14, 2011 at 07:09 AM
Check this link to the Unity docs: Surface Shaders Examples. If you scroll down to the bottom of the page, you will find a shader that makes everything fat, without having to scale objects through code. It's way simplier, and resusts are better. Look:
Answer by Kourosh · Apr 13, 2011 at 05:53 PM
Bobadebob is right, you can simply use Mathf.Lerp function or iTween to scale nicely over time. It'll look really nice if you scale parts of the body separately by different scales. Does not depend on your 3D modeling software. I really recommend iTween. It'll give you lots of animation features.
Answer by synapsemassage · Apr 13, 2011 at 08:32 PM
You could alternatively add skeleton (bones) to your character and make some animations that change your mesh to appear fat. This is quite flexible as you can influence certain body areas/parts by creating a special skeleton for your needs. Trigger your animations to grow your character fat. Scaling can be used additionally.
Your answer
Follow this Question
Related Questions
translating an accessory from source mesh to a targeted mesh 0 Answers
Scale collider independent of gameObject. 1 Answer
Scaling the Mesh Collider 4 Answers