måndag 7 augusti 2017

Textured seats and first person camera.


The seats that were previously UV-mapped got a leather texture added to them. The texture in Unity had its wrap mode on repeat the tiling of the material was adjusted to make the texture an appropriate size in comparison to the model. The texture and material can be seen below, both separately and on the seat.
Leather texture and material.

Textured seat model.
 Additionally, a camera was set up to give the option of letting a viewer see the cart movement in first person mode. This camera was set up through a simple follow script that makes the camera object follow an empty game object (called Camera Follow), which is a child to the front cart. The Camera Follow is placed slightly above the card to simulate the position the head would be in. The camera follows the target using linear interpolation of its own position and the position of the Camera Follow game object. Likewise, the rotation (quaternion) of the camera is also gotten through linear interpolation between the rotation of the camera and its follow target. The speed at which each value is interpolated was adjusted to make the camera follow the carts position and rotation at a good pace. Video of the first person camera (together with the third person perspective of the ride) can be seen at the bottom of the post.

Camera Follow variables.













Inga kommentarer:

Skicka en kommentar