I’m trying to make my character float to the heavens, setting its Alpha to 0.5, but I’m having trouble stopping my camera from moving. And somehow when it is following my character, the Z-axis gets involved. See the end of the GIF, where you can see everything getting skewered.
I created a Death Camera in the State Driven Camera setup and connected it, but I can’t figure out how to stop it from following.
How do I get to stop the camera from following the player when they die?
My code for floating upwards is this:
// Floating upward
Vector2 floatingUpwardSpeed = new Vector2 (0f, 2f);
rb.velocity += floatingUpwardSpeed;
// Stabilize horizontal movement
Vector2 stabilize = new Vector2 (0f, rb.velocity.y);
rb.velocity = stabilize;
I want the player to float upwards in a straight line, which doesn’t work as well. Maybe I’m doing something wrong in that code, which makes the camera go weird.