Pages

Mecanim Tryout

Let's make Unity's Ethan shake hand with a very very hot invisible chick. Press 'X' to shake hands
Very simple state machine










Idle to Shake Transition




















Shake To Idle Transition




















Flowchart-
Idle keeps looping
When "Shake" is set >> transition to Shake
Stay there until exit-time has occurred and Shake is set to false (It should be play once)

So we do need to write some code for this, Mecanim can't variables and stuff I think (not sure).

The trick for using "Boolean" trigger in Mecanim is -
Check if we are in proper state.
Set Flag
Next loop - Unset flag

Animation re-targeting is cool and all.. but I'm not so impressed with the design / architecture yet. Looks to me like it's gonna end up being a big pile of mess with lot of patch-works everywhere. Hope I'm wrong for my own sake..

A long time ago

A long time ago, I was a student. I was in my 12th (means final year of schooling, next up engineering). I had an exam the next day. Like always, I thought "let me study later, the day is still young and I have all night long to prepare."

So I started watching some highlights of a soccer game I had missed. Then came Dragonball Z. Then came something else, something else and so did the evening. It was sunset. Suddenly lights went out. But why? My dad had got an inverter installed an year back, I had UPS backup? It was then I realized there was a major power cut from morning and I had used up most of the battery.

WTF! My exams.. So while I was still like "Meh.." my parents freaked out, sometimes power never used to come back till next morning those days (actually sometimes even now). So we decided, we'll use the power judiciously.

So when I was studying, other than the one light in my room everything else was switched off. Then when my mom went to cook, only the kitchen light was on - and I waited. So using 1 light the whole night long, managed to pull it off without tripping the inverter.

You are probably thinking why I wrote this now?
Well... Unity just released a new version and you can have 1 dynamic light in the free version ^_^
Just saying... 1 light can make a big difference.

Also, a contest [See what I did there? O_o]


jQuery Accordion

Trying out jQuery - here's an Accordion in less than 10 lines of javascript!



You can also see the demo / code here. [in case the iframe gets blocked]

How it works

Structure:
Accordion
-- AccordionPage
------AccordionHeader
------AccordionContent
-- AccordionPage
------AccordionHeader
------AccordionContent

Logic:
On-click of Header - hide all 'content' and display the 'content' which is a sibling of the header.

Javascript: