Hey guys. Wondering if anyone knows how to create an air/wind shaft effect in Unity like so: Air Shaft: Fe Gameplay
Not really specified in the flight section of Unity but the most cleverly way I could think of is to increase and/or decrease the gravity variable of a rigidbody while it’s pushing at the same time.
Messy concept script:
If(Input.GetKey(KeyCode.W))
{
player.gravity += Time.deltaTime;
}
else
{
player.gravity -= Time.deltaTime;
}
if(isGrounded)
{
player.gravity = normalGravity;
}
I just used these basic lines to show you what I mean