What I’m making: Arcade/extreme snowboard/skate game. Think Tony Hawk Pro Skater or SSX.
My goal: I want to have my 3rd person camera chase my character while it’s in contact with the ground, following behind it whichever way it’s facing. Once it leaves the ground, I want the camera to be focused on the character, but only point in the direction of travel, so that the character can do crazy flips and spins without throwing the camera around everywhere (as in aforementioned games).
Where I’m stuck: I have a spring arm attached to my character, and have lag turned on, to where it feels comfortable. I also have the game differentiating between when the character is touching the ground and when it’s airborne. The camera follows my character perfectly at the moment, but for the life of me, I cannot figure out how to get the camera to just stay “behind” the character once it leaves the ground and starts rotating. It may be something simple, but I’m relatively new to Unreal Blueprint, and have next to no skill in C++. I tried looking all over the internet, but nothing matches up to what I’m trying to achieve.
Video of a slightly outdated build. The numbers are from me figuring out a decent charge time for the max jump height.
It’s the Absolute vs Relative transform mode of the component. This way you can rotate the actor but that one component (and any attachments) will align with the world for as long as it lives in Absolute space. Check this thread out for details:
Excellent. That worked wonders. Now the only issue I’m running into is when I flip the board to be “switch”, the board still flips on the Y axis relative to what the min X and max X of the board is. I want to set a bool variable called switch when the board hits the ground, so it knows witch way to flip when the button is pressed. I have the blueprint for that part
I think you would benefit in this case in making a seperate camera actor BP. That way you could manipulate the X, Y, Z how you want or need so the camera acts kind of like it is parented but yet its really not.
It has been a minute since I played those two games, but I think you probably don’t want the cam to do anything in the Z (up and down) like you said so when the player does tricks on the skateboard the cam won’t go up or down, or around and around (because the cam is not even parented to the player just following his Y and X).
You can check out one of the newest threads I made on that separate cam thing here.
Here is a thread where @ Everynone tried to explain to me how to achieve such an effect using child actors within your player character BP, unfortunately I never could get that to work as he did but your experience might be different than mine.