I was supposed to improve the effects of the melee combat but I got carried away with working on the whip so I just kept going and will keep going until I am satisfied with it, because the whip is more important to me than any melee attack.
It was actually a good thing I watched the video on math of Unreal engine because I dealt with vectors in trying to fix how objects are thrown. They are properly flung but they remain to static when in the air, there is no spin or change in rotation of the object. It looked strange simply flying in the air motionless. So I searched for help and found a solution to interpolate the object’s current rotation to the rotation of the vector it is pointed at. A vector is a direction with a length after all, at least that’s what I can recall, maybe I am wrong. Anyway it worked great, it would turn towards the direction it is being pulled. But it still didn’t turn enough for my liking. So, I kept trying different ways of adding, multiplying, and scaling the rotator of the target, but nothing worked.
When I tried combining the rotators it finally worked somehow. I’m not sure exactly what it did, but it adds a lot of spin. I think it’s adding the rotations constantly so it will keep spinning until told to stop, which I ask it to do once it hits something.
I also fixed the delay on the whip action, I changed the delay to a retriggerable delay because with a normal delay you can still spam the action. Then I wanted to greatly improve the appearance of the whip. It didn’t look great appearing and disappearing so fast. I started off by changing a lot of the whip’s properties, testing out which looked best. From the whip’s segments, to how stiff it is, its iterations. I changed and tested as much as I could until I found the proper numbers that I thought looked good.
There were some issues because I had the whip collide with some objects in the world instead of going through them. But I fixed that later on by turning the collision on and off at the right times.
With the whip targeting when the player is locked-on, I always felt there was something off with the distance. After looking carefully at the logic I had, I realized that it was getting the distance between the target and the character, but the trace of the whip is coming from the camera. That is why the target image was not matching up with the actual trace. So I replaced the distance check with the camera attached to the character and it worked accurately.
The whip looked strange when it didn’t hit anything, so I made sure it detached from the world faster, which made it look more fluid. I watched a lot of videos on whips awhile back to study how it looked and I watched a few more today, and will probably keep watching more tomorrow.
I can get it to appear fine, but the whip disappearing becomes an issue because I can’t figure out the right timing for it to be visible and invisible. Sometimes you can whip and the whip will be invisible. So I have to find a way to fix that. Plan is to continue working on the whip until it is perfect then I will move on to refining the melee combat. Instead of adding knockbacks to the player’s attacks I will probably learn how to add blood splatters, to add more visual effects to show that damage is being done.











