# Make Ball roll fully with torque

**URL:** <https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Blueprint, question\
**Created:** [June 14, 2022, 3:35pm UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796 "2022-06-14T15:35:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeBox9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoeBox9](https://forums.unrealengine.com/u/JoeBox9)\
**Post date:** [June 14, 2022, 3:35pm UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/1 "2022-06-14T15:35:56Z")

</div>

Hi, How do I make my player, a ball roll fully instead of these half rolls that reset?  
Here is a video:

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/f/eefa76d9fd65412380d3e2e61e24156fde0e00b5.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/f/eefa76d9fd65412380d3e2e61e24156fde0e00b5.mp4)
  
The ball’s rolling does not look proper. How do I fix this? I am using Simulate Physics with Torques on UE5

---

<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:** [June 14, 2022, 5:15pm UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/2 "2022-06-14T17:15:26Z")

</div>

> [@JoeBox9](#):
>
> I am using Simulate Physics with Torques on UE5

How are you applying torque?

---

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [June 14, 2022, 5:22pm UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/3 "2022-06-14T17:22:40Z")

</div>

I wonder why most people wants to roll a ball with torque. Just use ADD FORCE (push it!)

here the method I use:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/9/4698244968983a566b054645209371037905dee8.jpeg "Unreal Engine - Controlling a Physics ball") ](https://www.youtube.com/watch?v=P4by9YnkeeU)

I don’t use Character BP…I work with a custom PAWN actor.  
I apply the force to the ball static mesh component…I dont care the position or state of the pawn in the world…I work with the ball itself  
I have a center ball pivot (scene component) that I update with the center of the ball all the time, so no matter the balls orientation, I always have the balls center with the world orientation in a pivot where I can attach another scene component that controls the yaw (orbit) of the camera) and also I control the pitch of the camera (up/down) in the spring component.

For the movement of the ball I just apply ADD FORCE in the direction of the facing camera for forward backwards and I use the right vector direction for the side moving.

Hope it helps

---

<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:** [June 14, 2022, 7:50pm UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/4 "2022-06-14T19:50:10Z")

</div>

> [@eldany.uy](#):
>
> I wonder why most people wants to roll a ball with torque.

To simulate friction, to get it spinning; lots of things impulses cannot achieve or would make it look unnatural or undesired.

* * *

To do it with torque, you could use the camera arm’s right vector. Kind of depends on how you want the direction to work, though.

---

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [June 14, 2022, 8:07pm UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/5 "2022-06-14T20:07:10Z")

</div>

I understand…but most common usage I see here is trying to control the ball and I think in the real world if you want to drive a ball you push it in the direction you want to move it. don’t apply torque. floor and air friction works anyway

---

<div class="post-metadata">

**Author:** ![JoeBox9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoeBox9](https://forums.unrealengine.com/u/JoeBox9)\
**Post date:** [June 15, 2022, 3:52am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/6 "2022-06-15T03:52:43Z")

</div>

It looks a bit better after doing that. It rolls more but does not do it fully.

---

<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:** [June 15, 2022, 8:57am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/7 "2022-06-15T08:57:22Z")

</div>

> [@JoeBox9](#):
>
> Simulate Physics with Torques

The UE4 Rolling Ball template has it fully implemented, using torque also opens up for the use of physical materials properly, which I’m almost certain you’d need, judging by the video. Because who _doesn’t_ want to have a ball skid on ice?!

You can just duplicate it. If you don’t have / want UE4:

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

* * *

If you’re going to base the movement direction on the camera, use its right vector instead. It really depends on how you want the camera to work. Here’s an example for the cam following velocity:

> [@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/6):
>
> I’m trying to have a marble followed by a camera. I’d probably just have a springarm with Absolute Rotation follow Velocity (no Z): [[Image from Gyazo]](https://gyazo.com/d26ae2ad76116ca4964f42e4daa288fa) Add a small lag value to rotation perhaps.

But you may want another solution, ofc.

* * *

Here’s a 7 year old (!) example how to use the `Right Vector` I mentioned above:

> [@Third Person Camera in Rolling Template](https://forums.unrealengine.com/t/third-person-camera-in-rolling-template/497447/4):
>
> It could be as simple as this: But may need to be adjusted depending on what else is needed: but adding torque in the right direction is where Im having trouble You, kind of, solved it yourself - the Right Vector is key when working with torque.

Good luck!

---

<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:** [June 15, 2022, 9:15am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/8 "2022-06-15T09:15:05Z")

</div>

> [@eldany.uy](#):
>
> here the method I use:

This is neat! But I guess the method to use would depend on the desired result. You have some really _tight_ controls there. Right tool for the right job, ofc.

---

<div class="post-metadata">

**Author:** ![JoeBox9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoeBox9](https://forums.unrealengine.com/u/JoeBox9)\
**Post date:** [June 15, 2022, 10:37am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/9 "2022-06-15T10:37:12Z")

</div>

I made the sphere have simulate physics instead of the Capsule Component and it works but the capsule does not move with it. I tried Set World Location on it and it had weird results. It just made the player glitchely fly through the level. So I have to fix 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:** [June 15, 2022, 10:41am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/10 "2022-06-15T10:41:07Z")

</div>

> [@JoeBox9](#):
>
> Capsule Component

Why are you using a capsule? Have a look at the pawn setup I posted above. And replicate it. Or have a look at the template.

For something like this you probably do not even need a movement or additional collision comp. Keep it simple, at least for now.

---

<div class="post-metadata">

**Author:** ![JoeBox9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoeBox9](https://forums.unrealengine.com/u/JoeBox9)\
**Post date:** [June 15, 2022, 10:55am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/11 "2022-06-15T10:55:34Z")

</div>

I accidently added the Capsule thing as a first timer due to the character blueprint. So, I have to redo everything in a new BP?  
Edit: I need the collision for enemies to interact.

---

<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:** [June 15, 2022, 10:59am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/12 "2022-06-15T10:59:59Z")

</div>

> [@JoeBox9](#):
>
> to redo everything

If your player is not a bipedal humanoid with animations and all, there’s no need for the character blueprint, movement components or capsule collision. If you want a simple physically simulated ball you can posses and control - make a pawn, as in the pic above:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/e/03e99f190962034cb5a877968b9b642ae1ebb564.png)

You can always add an additional sphere collision or do it the other way round: use the sphere collision to simulate and collide and the static mesh for visualisation only. Optional.

---

<div class="post-metadata">

**Author:** ![JoeBox9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoeBox9](https://forums.unrealengine.com/u/JoeBox9)\
**Post date:** [June 15, 2022, 11:14am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/13 "2022-06-15T11:14:26Z")

</div>

I made a pawn and the enemies don’t move and I get an error after exiting PIE:

```auto
PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue". Node: SpawnActor Slapper Graph: Throw Function: Throw Blueprint: Dropper

```

How do I fix this?

---

<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:** [June 15, 2022, 11:19am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/14 "2022-06-15T11:19:45Z")

</div>

You’re trying to access a Character that you no longer have.

`Get Player Pawn` instead of `Get Player Character`.

* * *

> instead of these half rolls that reset

Almost certain this was caused by the capsule being flipped. Definitely do not use a Character Blueprint for this.

---

<div class="post-metadata">

**Author:** ![JoeBox9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoeBox9](https://forums.unrealengine.com/u/JoeBox9)\
**Post date:** [June 15, 2022, 11:26am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/15 "2022-06-15T11:26:12Z")

</div>

But the enemies are not following the player. Here is my code for following the player:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/f/d0f3c88b15def12b6325fcc3eb7d51e269bdd384.png)

---

<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:** [June 15, 2022, 11:30am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/16 "2022-06-15T11:30:58Z")

</div>

You’re still using Get Player Character… And you do not have a Character, you have a Pawn.

---

<div class="post-metadata">

**Author:** ![JoeBox9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoeBox9](https://forums.unrealengine.com/u/JoeBox9)\
**Post date:** [June 15, 2022, 11:32am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/17 "2022-06-15T11:32:34Z")

</div>

I am using Get Player Pawn Edit: Accidental Reply

---

<div class="post-metadata">

**Author:** ![JoeBox9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoeBox9](https://forums.unrealengine.com/u/JoeBox9)\
**Post date:** [June 15, 2022, 11:35am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/18 "2022-06-15T11:35:02Z")

</div>

It is still not working.

---

<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:** [June 15, 2022, 11:35am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/19 "2022-06-15T11:35:02Z")

</div>

> [@JoeBox9](#):
>
> I am using Get Player Pawn

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/1/8110283a3a94ba1c0733ef1d4160d9ef4bc5b522.png)

Who this boy then?

---

<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:** [June 15, 2022, 11:35am UTC](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796/20 "2022-06-15T11:35:33Z")

</div>

We do not know how you set up your script. We’ve gone from using torque to handling AI…

[Next page](https://forums.unrealengine.com/t/make-ball-roll-fully-with-torque/581796.md?page=2)
