A lot of new stuff has been added to the game since we came back from Easter break. We started out discussing whether or not to add a new quest to the game to add interest. Then instead of agreeing to say add a completely new quest in, I said that we could add some interactive places, such as bin. The player could push over the bin and the paper balls inside would pour out. So I’m going to finish this bin interaction first.
My idea at first was the simplest way to hook up a code to a bin and then add collider to all the paper balls, so the mouse can knock over the bin and the paper balls fall out. But this method does not work, I tried for a long time, rewrite a lot of code. Here’s the error code I started with:

Eventually I found that when I use the mesh collider of the bin, the inside of the bin is solid, so I can only not use the mesh collider of the bin. my final solution is to reattach a barrel-shaped collider to the bin, with four sides and one bottom. This way when the bin is standing up, the paper clumps don’t get stuck out due to the bug, they only come out when the player pushes the bin down. Also I’ve rewritten the code in a new, cleaner way:



When I was done with the bin interaction, I started doing interaction design about other things. I found a pen holder on the computer desk with a few pens in it, and I wanted to start designing around that. The principle is the same as the bin, recreate a colliders wall and attach the appropriate code. When the pen container falls, the pens inside will also fall out.

When I was done with that I wanted to give the interactions more of a sense of realism and I added interactive sounds into it. I added sound effects to both the bin and the pen drive when it fell, both of which I found on the FreeSound website. In addition, because the timing of the sound effect for the bin is not easy to confirm, sometimes the sound effect is triggered by just pushing the bin. So I added an area on top of the bin to trigger the sound effect only when the area on top of the bin touches the ground.




Here are my interaction tests.