Week 10 - Working on project [Progress]

 During this week, we got an approval from our Teacher for the project idea. It was kind off a rough start for this project, because we did not knew how the shooting physics works, and how to spawn particles from the Machine. After doing some research, we figured it out and this is how it went:


Dalius:

Tasks: Make a machine that shoots Objects, Create a special platform, add multiple projectiles to turret.

Description:  First of all I had to find out how the particles/objects are spawned in Unity. To mention that instead of skeet shooting machine, we just used a Turret, which was available for free in Unity Asset Store.

 Firstly, I Found out that you need to add a capsule at the tip of the turret, to get a precise location from where projectiles should be spawned.

And then after reading API documentation and some unity forums, I found out that there is a method called: Instanciate, and this method takes the projectile, position and rotation. First of all, we instantiate the projectile, and after that we added some force power to it, to make it to feel like a shot has been made! After that, I used audio source for the turret, and audio clip for a shooting sound, so every time shot has been made, the sound is getting played.
For calculation of shot objects, we made a simple integer, initialized it as 0 and every time turret shot an object,  it was increased by 1. 

Also our idea was to have multiple objects, which you can pick it up and place it on the specific platform, just to set the machine of which object it suppose to shoot.

 For this, we created a public array, so that you could drag Rigidbody elements to it, and when something Enters the collision of the special platform, we are checking if that object name is in our list. If it is, then we are just setting the projectile which has to be shot, and we made some kind of a check, if the object does not exists in our array list, projectileToLaunch will be set to NULL. 






Specific platform



Sayed:

We decided to go with Dalius idea. We were excited to start working on the project.

Because I had the VR headset, I decided to work on the movement, animation, hand models, gun shooting, teleportation, rotation, raycast grab.

At first, I started with the movement. We wanted the player to be able to move with the controllers and I saw some videos and read some articles about the movement and there are a lot of physics that is going into it. you need to consider collisions which prevent you from passing through objects. Being able to walk upwards like on the hill. The speed of walking and when are on an object and wants to jump, but you won’t fall, you must calculate time, gravity, and speed of falling. once you fall you must know when you will hit the ground.


I had a problem with rotation. I could not figure it how can I rotate the player with controller.

I just had to add snap turn provider component to locomotion system and choose the action for each hand. I choose left hand turn in input action reference.

Animation: I already animated hand models in our pervious project which was not complete.

I added the prefabs to the controllers.

Teleportation: I started working on teleportation in case we needed that. The default design is not cool, I had to modify some of the option. For example. The ray color and type. And when you activate it and it is teleportable, you will have a capsule which indicate you can teleport here.

Comments

Popular posts from this blog

Week 2 - Marker based AR

Week 6 - Progress of VR Project

Week 3 - Markerless AR