week 1- actually holding pigeons
This week was spend on figuring out actually how to get bird holding in there. When me and Zach were working on this game for our uni assignment a couple of months ago, we had a quick attempt at getting holding in there, but unity's cloth physics can be tricky and it was looking like it would take too long to try and figure out... but now I have time to try and get it to work! So I did :-)
Getting holding to work in game required a few things, the first being a hand. I had a go at modelling a few, but surprise surprise, hands are really hard to 3D model, so I just decided to use a pre made one. My focus for this project isn't really to get super crisp 3D models in there, so using a 3rd party asset sits fine with me :-) I'm using the hand models that come with the Oculus Unity Sample Framework kit - it's a pretty good model and it uses capsule colliders, which is super handy (as cloth physics can only touch capsule or sphere colliders). I'm not sure about the licensing so I might have to change it up later and make my own hands, but for the time being, it's a handy resource to use for prototyping!!!
The hands were pretty complicated and had a ~bunch~ of unnecessary Oculus stuff in there, which affected lots of things, like the colliders and rotation points - if you plan on using these hands, I highly recommend cleaning them up a bit in the inspector first!!!! You can kinda see what I was working with below - the right hand was how it looked initially, and the left hand is what it looked like after a sort through
The hand colliders were also a little bit of an issue - they were pretty accurate to the model, which would be great usually!!! The only issue is, because lots of the colliders were pretty small, the ball had an unfortunate habit of slipping into the fingers....
After a bit of fiddling around with collider sizes and tidying up the inspector, I ended up with a holding mechanic I think I'm pretty happy with. I added a weight to the bottom of the pigeon as well, to make him ever so slightly inclined to roll back onto his tummy :) It's probably technically a bug, but I especially like how his head kinda blobs into his body
Once this was done, I decided to put it into the game :-) this actually took a lot longer than I expected, partly because the pigeon 'brain' script is pretty complicated and I had to fiddle around with it a bit to make the holding work in game. I've settled for a pretty simple 'pet the bird for 10 seconds to hold it' situation. If you try to hold it too quickly, the birds will run away, so be careful!!!!!!
I thought I was done with the holding at this point, but after some playtesting it was decided that the birds needed some more squish. This was actually pretty hard to do - getting the squish to weight ratio right took a fair while. I added a spring joint anchored to the body connected to a weight underneath the bird, which really helped give the pigeon some weight. I also changed the two sphere colliders for the cloth component, and made their colliders both relatively close to 0.5 (0.4 each to be specific), which helps with sideways jiggle. The end result was much better, and I'm now pretty happy with what I've done in terms of holding the pigeons :-)
There's a few more things I want to add to the holding pigeon thing, but at least for this week, I happy with where I got :-)
Get Pigeon Game
Leave a comment
Log in with itch.io to leave a comment.