Floater manual

Floater is a simple-to-use script you can add to objects to make them float realistically in water. Floater plays well with Unity’s build in physics system, so objects that use Floater will interact realistically with other physics objects. Best of all, Floater also supports ragdolls, humanoid or any other body topology.  Use Floater to create realistically floating boxes, crates, balls, chests, barrels or any other simple shape. Create ragdolls out of dead enemies, and let them float in the water.


Create more complex floating objects, like a pontoon bridge. Connect Floater to the pontoon bridge, and let Floater automatically handle the movement of the pontoons as you roll tanks across the bridge.

Tons of applications for any game featuring water and stuff that floats.


  • Fast heuristic computation of sphere’s, boxes or capsules bouyancy
  • Automatic computation of density, for realistic behaviour
  •  Automatically detects correct shape and formula to use for a given object
  • Automatically handles ragdolls.
  • Plays well will Unity physics, allowing for floating objects that realistically interact with other physics objects.


simple geometric shape: 

Simply drag and drop the FloatingBody script on a non-kinematic rigidbody with a sphere, box or capsule collider attached. Adjust values for Water level, bouyancy and waterdrag as desired, or use the default values to get wood-like behaviour.


Drag and drop the FloatingBody script to the root of a ragdoll (for a guide on how to create a ragdoll, see here ).  Set the value isRagdoll to checked, and adjust values for Water level, Bouyancy, limbs bouyancy and /or Head bouyancy as desired, or simply use the default values.

Compund Object:

The FloatingBody component can be used on any ragdoll like object, i.e. a set of rigidbodies connected by joints. If all the objects have either a box, sphere or capsule collider, simply drag and drop the FloatingBody script to the root of the object, and set values as described in ragdoll usage above.

You could for instance build a pontoon bridge of boxes, or a rickety raft of capsules, and simply drag and drop the FloatingBody script to the root.

Floating Body component


Water level: The height of the water surface in world coordinates.  If you want an object to e.g. fall over the edge of a waterfall, you can change the value of Water Level dynamically.

Bouyancy:  Bouyancy is technically the density of the object / density of the fluid. The value is the fraction of the object that is submerged when the object is at rest. Set this manually to get the precise behaviour you want. If bouyancy is above 1, the object will sink.

Waterdrag: is a tweakable constant describing how much resistance the water creates. The higher the value, the more resistance the water provides.

IsRagdoll: If the script is put on the root of a ragdoll, set this value to true. FloatingBody will then treat the object as a ragdoll, and make sure it floats nicely. If the script is put on another type of object, Floating body will automatically work, and this value should be false.

Auto compute Bouyancy: If you have a rigidbody with a well defined weight already, and you want the object to float or sink as it should, based on real world physics, set this value to true: FloatingBody will then, at Start(), compute and overwrite the Bouyancy value described above. (Bouyancy is = mass of object / (volume * 1000)).

Limbs bouyancy: The limbs of a human body are generally a little less bouyant than the torso. Therefore, the limbs (arms and legs) should sink a little bit, while the torso should not. When isRagdoll is true, limbs bouyancy is used for the bouyancy of all capsule colliders in the ragdoll.

Head bouyancy: The head of a human body is a little less bouyant than the torso. When isRagdoll is true, the head bouyancy value is used for the bouyancy of all sphere colliders on the ragdoll.


Unity 5, first impressions

I’m on the Unity 5 beta now. I’ve decided after fiddling with it for a few days,  that the time for jumping over to 5 is now. After these few days of fiddling, here are my first impressions:

The good

Enlighten: In Unity studios, we often joked that there should be a “make nice game” button as a feature i Unity. With Unity 5, it almost seems like that button is there: The new Enlighten GI stuff is simply gorgeous. There are no two ways about it, it just looks significantly better, with the same assets (almost: You need to upgrade materials). Also: The new lighting window seems much more intuitive to use. Also: reflection probes…..

Standard shader: Unity has had the same pack of standard shaders since forever. They did the job, but messing around with shaders always felt like a bit of magic and fingerspitzgefühl. A shader setting on an object would look good only in very specific lighting setup. You would often feel you needed mutually exclusive features from two shaders. The standard shader changes this, with one (well … three … well … I say three .. really more like six…) standard shader(s).  The thing is the “one” standard shader comes in six setups: Standard / Standard (Specular setup) and three variants of those two: Opaque, transparent and cutout.  Mostly, you’ll use the standard shader though, and then use transparency variants as needed. The really nice thing about this, is you mess with the settings of ONE shader, and you get to know that one shader really, really well. Plus, so far it feels totally intuitive to play around with.

Automatic upgrade: “The meek” is a 12 GB project, filled to the brim with all kinds of asset store stuff. I made a backup, then fired up Unity 5 on the new project. It took a while… as in maybe an hour or two, but then the project was ported and I could see it in Unity 5. THEN Unity crashed, and continued crashing  :-). I never found out why, but it seemed the porting went just fine. I decided it was time to clean up the project a bit anyway, so I simply exported the scene I was working on as a package with all dependencies, made that into a new much smaller Unity 4.5 project, then autoported that: This time, it Just Worked ™. It even automatically updated API changes, and updated to enlighten.  A few things broke (Flux from asset store, I’m looking at you !), but the author of that package has openly stated that he was using unsupported Unity APIs.

Mute audio: Its a small thing, but something I have missed in a long time: You can now mute the audio in playmode. very nice.

The bad

Crash: Unity 5 is a little crashy. I’m on Beta 14, and of course it’s Beta, so there are crashes. Which sucks. But if you want the latest stuff, you need to accept the crashes. That suck. Cause they do.

Bug reporter: This has been a problem since Unity 1.6 really, and a problem that hasn’t ever been really solved. I acknowledge that its difficult, but it IS annoying: The bug reporter very much wants you to upload your project and provide a repro case. Remember the crash I told about, with the 12 GB project ? Am I going to spend a day uploading 12 GB project to Unity ? Nope. I want to help, and provide meaningful, useful bug reports, and I understand why this is important, so when I put this down as a “bad thing” I don’t really point my finger at Unity Tech: I can’t see what they should do differently. It’s just …ach. wish there was a good solution for this.

Asset store local cache: Not a new problem, but something I became extra aware of. : I have a primary SSD HD, of about 100 GB, plus a secondary of about 1 TB, standard HD. I have my projects and files and other really heavy stuff on my secondary, because I want my primary for fast stuff. I don’t think this is an exotic or weird setup. I can save my projects where I want, and specify my GI cache location (edit/preference/GI cache, you might want to do this too), but I cannot specify where to put my local asset store packages: This is a problem for me: My SSD capacity is expensive, my standard HD is not. And its a silly thing not to let us decide that save location … come on Unity Tech…

The Ugly

Iterative lightmap calculation: Also known as continuous baking: this is something that is sold pretty hard by Unity on their promotional videos of Unity, and in theory it’s an awesome idea: Set continuous baking on, and Unity bakes lightmaps in the background while you work. In practice, as of b14, it is useless. I have a quadcore PC: I would expect “in the background” to mean that Unity would bake lightmaps on 3 of my cores, leaving the fourth to run Unity, but no: When Unity bakes, it fucking BAKES.  all four CPUs working to full capacity. This has the entirely foreseeable result that the editor is about as responsive as a slug taking a bath in syrop. Which means that I click “continuous baking” of, and just do as I used to do, which is to mess around wih lights until I hope its good, then start baking lightmaps, and go watch a movie while Unity finishes up.
Also, I’m not sure, but it seems like as soon as I add something to the lightmap calculation everything needs to be recalculated. Which means, If I have continuous baking running, every time I make the slightest change, Unity starts over, and the more complex my scene becomes, the worse this problem becomes. So. Continuous baking needs a lot of extra work before it is actually nice.

The first impression:

So far, I’m happy with Unity 5. It’s a beta and has its issues as expected, but all in all , there are so many super, super nice things in the new Unity that I felt it was the right thing to make the switch now. I worry a little about my asset tore purchases, but since I mostly buy art, I’m not too worried. So, from me, it’s a clear thumbs up for Unity 5. Of course… I am a fanboy. 🙂

Zombie brains 101

I love making zombie games, and so do a LOT of other game developers. We love it, because it is really easy to make a zombie behave right: Zombies are stupid, simple creatures, so their basic behavior is easy to create. If the zombie does something really stupid, like walking into the propeller of a helicopter, that is perfectly OK: It’s a zombie. they are supposed to be stupid.

Also… zombies make great enemies: No matter what you do to a zombie, it’s pretty much OK, and fair game.

Now, with the Meek, I’m changing the rules of the “zombie game” just a little bit: Janet, my main character doesn’t like guns. She’s kinda McGyver meets Ripley: She’s scared, yes, but she keeps her cool, and she thinks her way through problems, using her skills as a special effects specialist to build improvised traps.  If you want to keep up-to-date on the game, you can go like the facebook page here, and of course check in here as well…

Let’s look inside the brain of the zombies in “the Meek”:

Enjoy. And as always, remember that they WILL inherit the earth…..

Meet Janet

Hi everyone.

It’s time for my first developer diary video.  I’ve decided to share my thoughts about the creative and technical process that goes into building a game like “The Meek”. I plan to upload a video every two-three weeks, for those of you that might want to follow.

In this one, the first, I’m introducing Janet Patrick, my main character, and the toolset I’m using to build her, and the undead hordes chasing her……

Enjoy !

The Meek

I’m happy to finally be able to show a little bit of what I’m working on now. Since going indie, I have the constant nagging feeling that what I’m building isn’t good enough, isn’t ready to show, needs just a little more polish…..

But, ready or not, here it comes (drumroll please): Proudly presenting : The Meek !


Janet Patrick, a young special effects assistant, wakes up one morning to find most of her hometown Los Angeles overrun by Zombies.   This proves to be the beginning of a very, very bad day.

As Janet, you try to make your way out of the infected city, without getting caught and killed by the zombies. Janet is not at all comfortable with guns, so she must find other ways to deal with those zombies she cannot sneak past. Luckily, Janet is a resourceful girl, who can turn all kinds of things into improvised traps for the Zombies.

Sneak your way past the hordes of Zombies. Lay deadly traps in their path, and explore the city, finding the truth about the outbreak, and maybe also the solution.

Follow the development of the game right here: I plan to be pretty open about how the game is progressing,  whats coming, and how I crack the many, many technical and creative nuts I’ll run into in the development.

You can also check out the games facebook page here: http://www.facebook.com/theMeekGame  Like or follow it, and it will be easier for you to follow the development of the game.  I’ll be posting updates here, and on the facebook page about the development of the game.

Thank you for watching, and remember: They shall inherit the earth…….