# PhysicsBall BP camera control sync how?

**URL:** <https://forums.unrealengine.com/t/physicsball-bp-camera-control-sync-how/484579>\
**Category:** World Creation\
**Tags:** controller, ball, unreal-engine, question\
**Created:** [June 8, 2021, 7:41am UTC](https://forums.unrealengine.com/t/physicsball-bp-camera-control-sync-how/484579 "2021-06-08T07:41:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NUKETheWay](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nuketheway/32/489447_2.png) [@NUKETheWay](https://forums.unrealengine.com/u/NUKETheWay)\
**Post date:** [June 8, 2021, 7:41am UTC](https://forums.unrealengine.com/t/physicsball-bp-camera-control-sync-how/484579/1 "2021-06-08T07:41:37Z")

</div>

I am trying to sync control with camera rotation.

Till now I followed this post

> [@How to sync controls with camera in rolling ball templete](https://forums.unrealengine.com/t/how-to-sync-controls-with-camera-in-rolling-ball-templete/109877):
>
> ok. so i have opened up the rolling ball template and played with the code a bit, and ive got a lot of cool things added. most importantly i have added an option to rotate the camera around the ball so its not a side scroller any more. but i cant for the life of me figure out how to sync the controls with the camera direction. if i turn my camera to look any direction but forward. the ball will still roll in the same direction despite turning the camera. if i get what i want the ball should ro…

But there is issue.

When we turn camera and look straight down from z axis (Top view), then the left/Right controls doesn’t work.

They only works when viewing from front or side views,

There is some conflict with z axis rotation and I can’t understand how to resolve it. Please help.

 ![340974-annotation-2021-06-08-130935.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/4/6248a21d2d147aa51a367f6fc846c514c7772c62.png)

---

<div class="post-metadata">

**Author:** ![Chatouille](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chatouille/32/1194622_2.png) [@Chatouille](https://forums.unrealengine.com/u/Chatouille)\
**Post date:** [June 8, 2021, 9:29am UTC](https://forums.unrealengine.com/t/physicsball-bp-camera-control-sync-how/484579/2 "2021-06-08T09:29:25Z")

</div>

When looking straight up or down, your ControlRotation forward vector only has a Z component, ie. (0,0,1) or (0,0,-1), so your end result is basically a zero vector.

I’m not familiar with rolling ball template, but try using character rotation instead or Control Rotation.

---

<div class="post-metadata">

**Author:** ![NUKETheWay](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nuketheway/32/489447_2.png) [@NUKETheWay](https://forums.unrealengine.com/u/NUKETheWay)\
**Post date:** [June 8, 2021, 12:16pm UTC](https://forums.unrealengine.com/t/physicsball-bp-camera-control-sync-how/484579/3 "2021-06-08T12:16:04Z")

</div>

can you please where can I find such function? I am absolute beginner. I tried searching function for “get character rotation” but no result

---

<div class="post-metadata">

**Author:** ![NUKETheWay](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nuketheway/32/489447_2.png) [@NUKETheWay](https://forums.unrealengine.com/u/NUKETheWay)\
**Post date:** [June 8, 2021, 12:19pm UTC](https://forums.unrealengine.com/t/physicsball-bp-camera-control-sync-how/484579/4 "2021-06-08T12:19:31Z")

</div>

Never mind. found it. Its name was “GetBaseRotationOffset”. Thanks Its working now

---

<div class="post-metadata">

**Author:** ![NUKETheWay](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nuketheway/32/489447_2.png) [@NUKETheWay](https://forums.unrealengine.com/u/NUKETheWay)\
**Post date:** [June 8, 2021, 12:26pm UTC](https://forums.unrealengine.com/t/physicsball-bp-camera-control-sync-how/484579/5 "2021-06-08T12:26:23Z")

</div>

Wait. its working but changing camera about z axis does not change the controls.  
Means looking from front view works correctly. but From back view pressing left character goes right and pressing right character goes left. It is not based on camera rotation anymore. I guess I have to both of them combined somehow.

---

<div class="post-metadata">

**Author:** ![NUKETheWay](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nuketheway/32/489447_2.png) [@NUKETheWay](https://forums.unrealengine.com/u/NUKETheWay)\
**Post date:** [June 9, 2021, 10:16am UTC](https://forums.unrealengine.com/t/physicsball-bp-camera-control-sync-how/484579/6 "2021-06-09T10:16:23Z")

</div>

Got the solution. It was so stupid.

lets see the issue first if anybody missed it.

Using get control rotation we get the position of our camera.

So viewing from top view was slowing down left/right movement of ball.

Why?

Because Get control rotation was feeding some some roll and pitch value with yaw.

For right/left move we only need to know Yaw. So this solved my problem

 ![341091-annotation-2021-06-09-154336.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/9/26941f0ffdb885d00468bdd42495de1a1b17faae.png)

Hope this helps somebody!

As a beginner  
I was looking for solution since 2-3 days and didn’t realize the solution was in front of me whole time
