Here are some details/problems I had while turning my ideas into reality
SELF-MADE GRENADE
3.2.2021
The reason I decided to have a Grenade actor is that I think I need to have a way to show the ability of 3D calculations. By simulating the parabola while pressing the key, the system should show the path of the grenade. I was thinking by recursively simulating a short distance of path with upward and downward calculation, the system should at least simulate a similar parabola. But I failed... Thus, I only had two simple 'DrawDebugLine' paths after pressing the key.
One interesting problem I faced is that while moving with only pressing the key (the grenade supposed to move with me,) but there was only the actor was moving with me and the mesh was not. So I decided to let set mesh's transform in the tick function. and set the actor moves along with the mesh after throwing the grenade
3.13.2021
Okay, I just rewrote my parabola simulation today. I think my thought before was a bit complicated and I just have a new idea. Since I am using GetActorForward() for getting my character's forward vector (Up and down,) I just have to consider it as a 2D Prabola and implement gravity on it. By using the C++ list, yes the first time I used STL functions in C++ xd, I have a list to store simulation points for DrawDebugPoints. So we have the following effects. And I found it is an improvement than before
Pictures from 3.2.2021
I tried making these two lines as similar as my normal grenade throw habbit
The outer circle is the area which system determines whether any actor should be damaged after explosion
This is the bug about while simulating the path, the player could still trigger the gun
I tried making these two lines as similar as my normal grenade throw habbit
SELF-MADE GRENADE
3.2.2021
The reason I decided to have a Grenade actor is that I think I need to have a way to show the ability of 3D calculations. By simulating the parabola while pressing the key, the system should show the path of the grenade. I was thinking by recursively simulating a short distance of path with upward and downward calculation, the system should at least simulate a similar parabola. But I failed... Thus, I only had two simple 'DrawDebugLine' paths after pressing the key.
One interesting problem I faced is that while moving with only pressing the key (the grenade supposed to move with me,) but there was only the actor was moving with me and the mesh was not. So I decided to let set mesh's transform in the tick function. and set the actor moves along with the mesh after throwing the grenade
3.13.2021
Okay, I just rewrote my parabola simulation today. I think my thought before was a bit complicated and I just have a new idea. Since I am using GetActorForward() for getting my character's forward vector (Up and down,) I just have to consider it as a 2D Prabola and implement gravity on it. By using the C++ list, yes the first time I used STL functions in C++ xd, I have a list to store simulation points for DrawDebugPoints. So we have the following effects. And I found it is an improvement and looks better than before. I will be working on raycasting for simulating collision with objects
Pictures from 3.2.2021
I tried making these two lines as similar as my normal grenade throw habbit
The outer circle is the area which system determines whether any actor should be damaged after explosion
This is the bug about while simulating the path, the player could still trigger the gun
I tried making these two lines as similar as my normal grenade throw habbit
Pictures from 13.3.2021
👆 for Genearting Simulating Points
👇 for Drawing points with DrawDebugPoints
HEALING TRIGGER VOLUME
3.2.2021
Using Trigger Volume's OnoverlapEvent methods, the system checks if the overlap actor is player or not. I could make the trigger functional for other AI actors as well, but I feel like it would be too hard for players passing the level. While using DrawDebugBox in the tick function in every tick, I found that this tremendously affected the fps of the game. So I decided to build the box at the beginning of the constructions and only construct once for the red box (a tiny bigger than the green box in order to cover it) after healing for showing it is still in cold down.
IN GAME AI
3.2.2021
I have to admit that my AI settings are not the best. they are sometimes (most of the time) very dummy facing the player. My main goal with the AI behavior tree is to first, checking if they see the player. second, check if they have ammo left. Third, if they hear any gunshot while patrolling. And the last, normal patrolling.
There are several problems I had. The AI characters will not react to the player immediately after seeing them which I think is because they are still in command of doing others. Second, their gunshots are too precise, which I feel is impossible to face more than 3 enemies at the same time (with this, I will think of a way later on by making them miss some shots in the crossfire). Third, which had bothered me for days to fix it, they do not know following the players while reloading !!
I think I need to and will be putting more work on AI settings later on
Updating the location of the gun shot
Updating the player-on-seen location and go to the location immediately