top of page

Tank Control Research

  • Writer: Janice
    Janice
  • Apr 20, 2024
  • 1 min read

Camera Movement & Zooming:

Camera control in the scene depends on a spring arm, which seems to control the spring movement from a point of the spring arm. The spring will move according to the user's cursor movement and position. Therefore, I first choose to use a quaternion euler which will return a rotation axis. But it was not working.


Instead, use simple rotation and reference the axis of offset to make the spring arm rotation at a point.


Zoom in and out is simple to change the volume of camera (https://docs.unity3d.com/ScriptReference/Camera-orthographicSize.html) and clamp between two set max and min value for the camera to zoom in and out. However, Camera.orthographicSize() is not working but the idea of clamp between max and min values to on the right track. After running through the framework, found the variable reference to the camera zooming and clamp with camera distance, max and min value to make the camera able to zoom.



Turret Rotation:

The turret rotation is based on the lecture and tutorial exercise and replaces the value used in the tank turret. Rearrange the rotation parenting, and rotation speed of the tiger tank and reference the camera.


Outcome:


Comentários


Janice Game Portfolio

  • LinkedIn
  • YouTube
bottom of page