hi, welcome to mix and jam a channel about game development. Experimentation today’s. Project is inspired by Kingdom Hearts in the game. There’s, an attack called shotlock in which soar locks into enemies and then shoots energy beams.
At them, my goal for this project is to try and build a similar effect using unity. So here are the steps I needed to follow for the recreation, build a detection system for the enemy targets, work on the projectile spiral, movement, implement the shot, lock, cinematic and then polish, the scene with particles in effects.
I started by making the third-person camera control based on this tutorial by film stone. Then I downloaded some animations from xmo to use them in the character’s, movement and cinematic. I downloaded a model of the Keyblade by this user on sketchfab and attached.
It to my player for the target detection. I first implemented the aiming mechanic in which I modify the values of the cameras field of view and the tracked objects offset to zoom in and out to detect multiple targets in front of the camera.
I decided to create a Collider on the camera that has the edge triggered property on with that I can detect which targets are inside or outside the collider, using on trigger, enter and exit functions and store them into a list of transforms.
Then, while the character is aiming, I go through all of the targets on that list and add them to another list which accumulates previous elements. Now that I was detecting all of targets, I started working on the projectile.
I made it so that the projectile was a three part object. Prefab. One of those objects was an empty parent that would look forward to the target, then a second empty game object that would be used as a pivot for the third object that has a trail renderer.
So by rotating that pivot we get the Spyro effect. So in my code, I go through all of the targets and instantiate the projectile prefab, while changing the angle based on a 360 circle, then on the projectile itself, I created a script that made it move up and then rotate on the z-axis.
At the same time, after that initial movement, I made the projectile look towards a target by using a transform look at, and I also made the pivot object on the prefab rotate. At the same time, I started working on the shot lock cinematic.
I started by placing some cinema sheen virtual cameras in front of the player. Then I open it up. Unity’s timeline to work on the cinematic transitions for the player animations. I simply drag the animations.
I want into the timeline and then set a smooth transition between them. I also did the same thing on a cinema scene track for the camera transitions to make the shot lock attack start only on a specific frame of the cinematic.
I attach the original code bit with that behavior to another game, object and use the timeline activation track. In that way, I can enable the code in timeline and use the on enable function to execute the code for some polish.
I started working on some particles. The great thing about timeline is that we can use control tracks to emit and preview particles on a cinematic, so the first particle I worked on was the line emission one, which I made by changing the render mode to stretch, billboard and changing its length scale.
Then I worked on the glowing sphere that uses the color over lifetime property to slowly turn blue. I added this multiple emission particle, this flash particle that has a light property on allowing it to also emit a point light and then a smooth circle emission that uses this image.
I created. I also recreated most of the UI elements from the game, including the radio slider and the lock-on image. To finish things up, I replace the cubes with enemies that kind of look like heartless from the game, and then I added some post-processing, like blue color, grading and motion blur and after a bit of adjustments.
This is how it turned out [, Music ]. You can find a link for the project’s. Repository on the description below mixing Jam is only possible because of every amazing soul helping out on patreon, including these top-tier supporters.
So if you enjoy the channel, don’t forget to subscribe to check out the future projects. Thank you so much for watching [, Music, ]