Things to ponder -
It's a pain in the brain (O_o) to configure the Physics engine to work for simple things like this, that too when scaled to real world.
First i had to setup a few parameters to tell Physx to consider collision at very small dimensions
Then I had to tell it to use "Bouncy" material
Then I had to tell it to confine rotation and stuff so that Puck doesn't fly-off.
I still couldn't get the desired effect, and like icing on cake - there is no "Cylinder" collider in Unity, nor a 2D-Circle thingy. So eventually, i was frustrated with all this, did my very-simple-stupid-flawed Circle-circle collision x_x
This proto has NO rigid bodies at all, the physics engine is probably like "Dude.. I'm bored >.<"
Lessons learnt -
To make small games like these, it's probably a good idea to scale everything up
Setup game dimension (screen width & height) before-hand and use the same settings while developing / testing
Programming the AI (so to speak) / NPCs is always more difficult than what you initially assume
Dropbox is awesome to host your blog content
Hi, I'm trying to make a air hockey game in unity and I'm getting frustrated with the physics. Could you please email me how you achieved this cool prototype.
ReplyDeleteThanks,
Stefan.
Hi,Vikram
ReplyDeleteI want create a air hockey game via unity. .Can you help me about this game's codes? Im a beginner at unity3d.Please e-mail.me. Thank you.
This comment has been removed by a blog administrator.
ReplyDelete