How do i make a ball roll in the direction im looking in?
Here is the blueprint: Help!!! posted by anonymous | blueprintUE | PasteBin For Unreal Engine
The ball rolls, just not in the direction i’m looking in, i’ve tried multiplying the make vector with the forward vector of the ball, but it launches me faster than the speed of light and crashes.
1 Like
Take the forward vector of the camera and apply it to the ball.
In 4.27 there’s a rolling ball project template. The balls has physics applied, and they use ‘add torque’.
can i have an example of how one would do that?
I made a pawn BP. Put the ball in it, and a spring arm with a camera
This is the code to impart direction from the camera to the ball ( I have no idea why it uses Y instead, but I recall the UE4 template also used it ).
And boom

This works, it’s just the ball spins insanely fast. and im also using enhanced input.
You need to apply damping… in the ball details, I think I said 3.
done, however, w, a, s, d all do the same thing.
I’m only showing you how to make the ball move the way the camera is facing.
If you want to learn how to write a pawn, that’s a whole other thing 
Also, you can temporarily install 4.27, and get the project, migrate the blueprint to 5, and you’re done 
can you recommend any documentation or tutorials that can help me do that? “write a pawn”?
tried that, nothing happens.
Did you get the hierarchy right?

The spring arm is not connected to the ball.
Did you also actually make it a pawn?
Yes, it is a pawn, and when the spring arm isnt connected to the ball, it doesnt follow it, i want the camera to follow the ball.
Have you got enough room to install 4.27 temp?
Much quicker than me trying to remember everything…
This works, but I’m pretty sure it’s not the best way
yes, that works, i still dont see why i would need to do this when i can just attach the spring arm to the ball and do this, which works just as well:

With me, it spins round with the ball.
1 Like