# Camera Chase in Snowboard/Skateboard game

**URL:** <https://forums.unrealengine.com/t/camera-chase-in-snowboard-skateboard-game/511105>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, UE4-27, question\
**Created:** [March 31, 2022, 6:56am UTC](https://forums.unrealengine.com/t/camera-chase-in-snowboard-skateboard-game/511105 "2022-03-31T06:56:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AugmentedSmurf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AugmentedSmurf](https://forums.unrealengine.com/u/AugmentedSmurf)\
**Post date:** [March 31, 2022, 6:56am UTC](https://forums.unrealengine.com/t/camera-chase-in-snowboard-skateboard-game/511105/1 "2022-03-31T06:56:35Z")

</div>

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.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/3/5a3e775bfaf47ad7fbbd575122e751dff760a81c.jpeg "Untitled Extreme Snowboard Game Early Build") ](https://www.youtube.com/watch?v=r5EcQl8FLhA)

---

<div class="post-metadata">

**Author:** ![Eliice](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eliice](https://forums.unrealengine.com/u/Eliice)\
**Post date:** [March 31, 2022, 8:08am UTC](https://forums.unrealengine.com/t/camera-chase-in-snowboard-skateboard-game/511105/2 "2022-03-31T08:08:39Z")

</div>

Hellow

From what i see in your video, you seems using the same way to handle rotation in both case.

First, i would have an bp like the following sample.  
 ![playerbp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/a/7aa0a8056b27e6a218e38a02534f6e666477168a.png)

Then, when the player is on the floor, you rotate the actor (like you already do) and when he is in the air, you only rotate the mesh component.

Some node in character movement will help you knowing when the player is in the air or not (I let you look at the documentation for that 😉 )

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 31, 2022, 8:13am UTC](https://forums.unrealengine.com/t/camera-chase-in-snowboard-skateboard-game/511105/3 "2022-03-31T08:13:14Z")

</div>

> [@AugmentedSmurf](#):
>
> cannot figure out how to get the camera to just stay “behind” the character once it leaves the ground and starts rotating.

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:

> [@How do I make a spring arm follow a velocity not a rotation](https://forums.unrealengine.com/t/how-do-i-make-a-spring-arm-follow-a-velocity-not-a-rotation/470329):
>
> When my vehicle is on the ground the spring arm should act normally (inherit x,y,z with a slight lag). When in the air I would like the spring arm to follow the vehicle’s velocity, as in the air my vehicle can be spinning on all axis. The best example I have of this is Rocket League: [image] I have tried everything within the spring arm settings for this but I can’t get it working. Hope someone can help!

Very similar case.

---

<div class="post-metadata">

**Author:** ![AugmentedSmurf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AugmentedSmurf](https://forums.unrealengine.com/u/AugmentedSmurf)\
**Post date:** [April 1, 2022, 1:44am UTC](https://forums.unrealengine.com/t/camera-chase-in-snowboard-skateboard-game/511105/4 "2022-04-01T01:44:00Z")

</div>

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/b/42b9620081102ef1e36dfc87f63abec3c9ef82ef.png)

I just now need to figure out how to determine the direction of travel, in relation to the board mesh, and assign the “switch” bool accordingly.

---

<div class="post-metadata">

**Author:** ![usa423](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/usa423/32/918773_2.png) [@usa423](https://forums.unrealengine.com/u/usa423)\
**Post date:** [April 1, 2022, 2:08am UTC](https://forums.unrealengine.com/t/camera-chase-in-snowboard-skateboard-game/511105/5 "2022-04-01T02:08:40Z")

</div>

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.

> [@Another camera actor question](https://forums.unrealengine.com/t/another-camera-actor-question/256035/6):
>
> That is an idea, thanks.

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.

> [@How to make a camera that acts like a cam parented to a character, yet, is in its own blueprint?](https://forums.unrealengine.com/t/how-to-make-a-camera-that-acts-like-a-cam-parented-to-a-character-yet-is-in-its-own-blueprint/254387):
>
> Imagine the camera in the side scroller template. I deleted that parented camera, and made an actor blueprint and added a camera, compiled and saved, dragged it into the world and positioned it to achieve about the same look as the other camera. Went into the level BP and added a few things now that new camera is the default when I hit play. What I want to do is for that camera to perfectly match the players movements, I suppose all but the X. And at the exact SAME speed as the player characte…
