Riveter Industries
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Malus Containment - 10/10/2015 - Not-so-brutal workarounds

Go down

Malus Containment - 10/10/2015 - Not-so-brutal workarounds Empty Malus Containment - 10/10/2015 - Not-so-brutal workarounds

Post by Landy Sat Oct 10, 2015 5:15 pm

If you don't already know, Malus has been on hold thanks to a pretty nasty bug in Unity. For a simple explanation, whenever a GameObject is scaled negatively, it's rotations completely break.

What's a GameObject used for? Well, in older versions of Witness Protection, an empty GameObject was used to dictate where bullets come from when fired from your weapon. In Malus, that system is exactly what we use.

This worked in Witness Protection because it was a 3D game, and all we had to do to re-position models was to do a bit of rotation.
Malus, on the other hand, is a 2D game, which means that things aren't as likely to change direction via rotation. To flip Clyde around, we relied on scaling his model negatively. This makes it so he's literally "flipped" the other way.

Sadly, thanks to that Unity bug, stuff breaks when we scale it negatively.
I've placed a cube object at the front of Clyde's pistol for an example.

Malus Containment - 10/10/2015 - Not-so-brutal workarounds 2d0845130e
Works fine here, unflipped...

Malus Containment - 10/10/2015 - Not-so-brutal workarounds 51cc9d04d2
...but when Clyde is scaled negatively, the cube's collider doesn't rotate properly.

One day, my girlfriend (Cannibun on the forums) gave me an idea: I could make a seperate model and seperate animations for whenever Clyde would be flipped. I initially thought this wouldn't work, as the only method I knew to mirror models could only mirror geometry and not the skeleton or animations. This meant I would have to precisely and painstakingly re-create every animation for use on the flipped model. As such, we decided to take it the easy way and just waited for Unity to fix the bug.

Obviously, the bug wasn't (and still hasn't been) fixed. I grew impatient, so I decided to try and revisit Cannibun's idea.
The modelling software I use is called Milkshape3D. I got it a long time ago. It's more fit for Quake 3 or Half-Life, but most somewhat-modern formats aren't an issue with it.

At first, I tried flipping the geometry, then rotating the skeleton, which broke the animations pretty badly...
Malus Containment - 10/10/2015 - Not-so-brutal workarounds 43f1c30c34

A bit later, I noticed an option in the "Tools" menu of Milkshape3D:
Malus Containment - 10/10/2015 - Not-so-brutal workarounds 3778c5de15

I then tried using the tool, thinking "No, there's no way it's this easy..."
Malus Containment - 10/10/2015 - Not-so-brutal workarounds A548587345

And to my surprise, it worked!!
Malus Containment - 10/10/2015 - Not-so-brutal workarounds Ae517170f8

But I had a feeling it wouldn't work as well with mirroring anima-
Malus Containment - 10/10/2015 - Not-so-brutal workarounds F27b35f92d
...it really DOES work wonders!

So, in a nutshell, Malus should be back on track as soon as Stryke puts aside whatever mad science experiment DEAD PROJECT he's currently working on.

We'd also like to raise awareness to the bug, as it apparently hasn't seen a fix in 2 years, maybe even longer.

-Landy
Landy
Landy
Developer

Posts : 46
Points : 3642
Join date : 2015-04-21
Location : Probably behind you

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum