Indie Journal: Week 5

This week, my focus was the creation of an upgrade for a character. I wanted something that could be unlocked through a source other than the soul capture system, so I began brainstorming. I ended up with an idea that allows additional ranged attacks whenever you make a normal attack. Basically, whenever you do one of the 3 combo attacks, it spawns a projectile that after a short time, fires towards where the mouse was facing.

I began work on the project - the first thing I did was create 2 scene components on either side of the player. These would be used for the location of the projectiles. When developing the projectile itself, I used a scaled down version of the sword model I used for the basic attacks. I had these projectiles do the same 'Face Mouse' system I used for the player. However, I came across a rather confusing issue.



Upon creating the swords, they would correctly face the mouse only if the player was facing north. If the player turned south, the sword would face an entirely different direction.

It took my all week to try and figure out the cause of the problem - it turns out, the issue was that I was figuring out where the sword should be rotating inside the player. This was so I could use the exact same information that the player uses (with a different starting location) and have it face exactly where the player was facing.

To fix this, I did the calculation for each sword rotation inside themselves, without interacting with the player. While this fix sounds simple, it wasn't something I realised at the time, and therefore didn't implement until later.

I realise that this is a similar case to the knockback situation - I was interacting with data in the wrong way that caused issues. In the future, I've been trying to make sure everything doesn't unnecessarily pull data from another object, since that could cause issues. While I still do this in some cases and it works out, I will be more cautious from now on with how I go about creating what I want.

Comments

Popular posts from this blog

Indie Journal: Critical Evaluation

Indie Journal: Week 6

3D Journal: Critical Evaluation