24/09/2021

[Unity] Fury Skies

A sample 3D plane flying project made with Unity.

Get the code from the repo or play online.

Much anticipated sequel to the exciting Fury Roads, it's time to elevate your rage to the skies.

Controls:

WS - pitch (up/down)

SPACE - turbo

X - invert pitch controls (down/up)

R - restart level

Q - quit

PrintScreen - take a screenshot of that beauty in action

Alt+F4 - close your browser and go take a walk with your mask on

CapsLock - bring that rage to the comments section

 

Interesting notes:

  • GameObject component inheritance seems to behave differently from OOP inheritance, not all parent Components are inherited by the children (but are accessible via GetComponentInParent)
  • Time.deltaTime can be used in transforms to equalize values between different systems running at different framerates
  • FixedUpdate should be used to update physics related stuff (eg movement)
  • 3D is weird: X axis = depth, Y axis = height, Z axis = width. So movement forward is on Z axis. Camera is not considered in the default transforms. I understand this is because Z axis is the direction the player is facing, making "forward" a Z change rather than X.
  • Instantiate(PREFAB_PARTICLE_OBJECT, transform.position, Quaternion.identity).Play(); will spawn the particle effects in the current object position. Invoke this before destroying whatever you collided with and get an explosion animation.
  • 3D particles are weird, provide a material, shape and color or you get pink cubes even if you change the startColor
  • Input.GetAxis("Vertical") gives the current player input on Y axis (even in 3D)
  • 3D is weird part2: right side view of an object in coordinates 0,0,0 is a camera with Y axis rotation -90 and X axis delta of +10

No comments:

Post a Comment

With great power comes great responsibility