- Home /
Make a simple reservoir (or tank, whatever you want to call it)
Hello. I have a 3D model, a turret. I it has the tank modelled in it, and I want it to be filled, and go down as it shoots (then it reloads). My question is, what is the logic that I need to control a spherical tank fill?
Note: It is a spherical shape, so I don't think scaling something inside it would work. Note 2: I don't need it to be a realistic fluid, just something that waves.
Sorry if this question is too generalistic, but I don't know how to make it more specific.
Answer by Cuttlas-U · Sep 25, 2017 at 06:18 PM
hi; there is a good tutorial here ; https://gamedevelopment.tutsplus.com/tutorials/creating-dynamic-2d-water-effects-in-unity--gamedev-14143
its for 2d i think but u just need a few changes to it so it can be used in 3d too ;
like u can rotate it to always face the camera then u are good to go ;
this is a simple awnser there are some plugins for it in asset store too ;
Thanks for your suggestion, but I think that is just too complex and heavy for what I want to do. But I will still consider using that.
Answer by dju4ic · Sep 25, 2017 at 08:38 PM
@Cuttlas-U has a good article there, however it might be a little heavy on calculations for what you need. A more optimized way which I would personally do is make up a very simple animation in blender for the waves, and do up a blendshape and just blend between being full/empty states.
I also thought about it being too heavy, but didn't know what else to do. About the Blender animation, what do you mean by BlendShape? I'm pretty newbie so thanks if you explain that stuff.
Basically you can force the animation to blend between states / empty/full or whatever you would like. Would probably be a good read, opens the door to many more possibilities in the Unity world =)
https://docs.unity3d.com/$$anonymous$$anual/BlendShapes.html