Game Designer & Programmer

Blog

Senior Project - PPJ #18

Character work continues to be in full swing. This week was spent refining the hair and scarf sims, working on the animation blending, and attending a play-test.

The hair and scarf simulations provided an interesting problem. Last week, I made the switch from a cloth sim to joint chains a got muuuuuch better movement. The main trade off was that we lost collisions and the simulations could clip right through the player. I attempted to add colliders to the joints but ran into a number of problems: initially, adding the extra colliders caused the player to fall through the world due to the collisions with the main character gameobject capsule. To fix this, I added smaller colliders to the head and chest joints and added all of these colliders to a new layer so that they could only collide with each other and not the main char collider or environment colliders. This worked well for the most part and caused the simulations to react to the character geometry realistically. However, in game the nice smooth motion of the simulations was lost. My working theory is that the joints are too close together on the joint chains, so their colliders are hitting when the player makes an abrupt motion, causing the chain to accelerate unpredictably and stretch dramatically. I have a fix in mind, but for this week the chain sims were added to the play-test build without colliders.

I finally got started on the animation blending this week after confirming the final file structure of the character assets and concepting the final system. The end goal of this is to replace the current aiming UI element with the characters raised arm. Rather than have a UI element, we want the players aiming direction to be indicated by the characters arm being held up. This means that I have to override the characters animations on the arms so that the animation is ignored and the arm raise pose is pushed through. Then I’ll have to allow the bone to be edited at run-time to be rotated. Last, I need to create functionality to switch arms when the player aims across the characters body, meaning that when the right arm needs to swing past the chest to aim left, Ill switch the characters arms so that the left arm is up and being used to aim.

This week I got the animation mask working and a basic pose in engine. I spent a ton of time struggling with the arm rotation and got the most BASIC of rotations working. This is so difficult because I’m having to calculate the arm rotation separately from the current aim direction and it gets screwed up due to the change from global to local rotation space on the bone. This causes a ton of problems because of how nested the arm joints are (the joints are receiving transform instructions from TONS of parent objects). I’m still working out the kinks, but shortly I’ll to start on the arm switching.

Hours:

-Hair/scarf sim work: 3 hrs
– Animation work: 7 hrs
– Play-test / bugs: 3 hrs
– Meetings: ~2hrs

Total: 15 hours

Visit our senior project blog here.

√121