Corona-cation (Day 25)
Juggling projects
Today I went back to working on the top down game. I was assigned to finish 2 of the enemies so that I could work with our animator and get everything everything working; animations lining up with ai tasks and that kind of thing. I chose to finish the Plague Doctor and the skeleton archer (mostly because I had already done most of the work on them, but don't tell the team that). These enemies had had some attacks added to them in the new design doc, most of which were variations on already existing attacks.
For example, the archer was given a triple shot which would just be calling the shoot function three times. I did this but then quickly ran into issues. The first being that, as the three arrows would fire, they would all try to attach to each other like they would to a player. I fixed this simply by checking that the actor that the arrow collided with wasn't another arrow.
The next problem was that the arrows weren't actually sticking to the players like they should. I spent a good while trying to figure out why, and looking around the internet before I actually read what the function was doing. We were using the "attach to actor" node which had a name variable input which was plugged in to the hit bone. I did not however read that the input was asking for a socket name and not a bone name. When I noticed this though I realized what this meant in terms of attaching to the player. My first thought was to add a socket to every bone, named in a way so that I could just get the bone name from the hit result and append "_socket". I quickly realized that this would not be the best solution when I saw the bone tree had more than 5 bones.
For the time being I have come up with a solution that is passable. That is to use the spine bone to attach to. By doing this it will track with rotation and all but is less accurate in terms of placement on the mesh.
Note I also had to do a few other things to get it working fully. I had to disable gravity on the projectile otherwise it would attach to the player but then immediately fall back down. I also had do disable collision on the arrow as if I didn't the player would constantly collide with it, in some cases making them fly. *flashbacks to box-fly in step back game*
Tomorrow I will work on the Plague Doctor and making the poison effect into an in-world item that splashes and stuff.
Comments
Post a Comment