How do you make a player controlled rolling ball for Paper2D?

Hey there!

I want to make a feature in my game were the player tranforms into a controllable ball that can jump and has air control but still rolls well in paper2D and im wondering how to go about doing this?

also would it have to be made a pawn for the player to take over it without the normal controls of the character affecting the balls movements. ( I have tried using the 3d roller ball example and locking y axis but it seemed like the controls might of been messed up by my 2d character bp controls)

Hey

In order to add a roller ball into your level, you should create it as a sprite since you’re working with Paper2D. If you take a look at our Content Examples, you’ll be able to learn a bit more about Paper2D and kind of ‘reverse-engineer’ what they’ve done within the Paper2D map. Content Examples is available in the Epic Launcher under the Learn tab, you’ll see it listed just below ‘Engine Feature Samples’.

Here is the [Paper 2D Content Examples][1] documentation. I would suggest reviewing this page as well as the related topics which are included at the bottom of that specific page I originally linked to you. You’re more than likely going to need to create a flipbook, depending on how exactly you’re implementing this roller ball.

Cheers!

Content Examples Sample Project for Unreal Engine | Unreal Engine 5.1 Documentation

I have looked through the paper2d examples and already know how to make a sprite physics ball, Its more the controlling it as the player similar to how the 3d roller ball example is just with y axis locked and also switching back and forth between default character and ball.
thanks.

Hey

I have submitted a request for a bit more information from our Paper2D developer on your specific question. Although while I wait for response, I had a few questions for you:

Are you trying to transform your 2D character into a 3D ball?

If so, this is possible however, you’re going to need to set it up to switch the components between the flipbook to the 3D ball controls. Otherwise, it’ll continue to use the controller for your 2D game.

Are you trying to transform your 2D character into a 2D ball that moves similar to the 3D rolling template?

If you’re trying to set this up, you would simply need to create a flipbook and animate it accordingly.

Are you trying to transform your 2D character into a rolling 2D character?

This is also possible and you would simply need to create the proper flipbook and animations for this to work.

Looking forward to assisting you further regarding your request, thank you! :slight_smile:

Thanks for helping, ill try answer I think im being a bit confusing with my question.

–Are you trying to transform your 2D character into a 3D ball?
Yes,basically I want the movements the 3d example has. just making the 3D mesh invisible so I can put a 2d sprite over the top for looks.

–If so, this is possible however, you’re going to need to set it up to switch the components between the flipbook to the 3D ball controls. Otherwise, it’ll continue to use the controller for your 2D game.

Yes, I tried to do this myself by copying the 3d example over to my project but couldn’t get it to switch over without conflicting with the 2D characters controls (so I didn’t move using w,a,s,d)

–Are you trying to transform your 2D character into a 2D ball that moves similar to the 3D rolling template?
Yea I want it to move almost exactly in the way the 3D rolling template does just constrained to the 2d axis so rolling left and right across the screen.

–Are you trying to transform your 2D character into a rolling 2D character?
Im not trying to animate a roll.

hope this helps its one of the main features I want to get into my game and im having quite a bit of trouble working out how to do it. thank you.

Hey

If you open up the physicsballBP, you can go into the viewport and actually go under the rendering section and mark it as hidden in game, or just uncheck the visible box if you don’t want the ball to show up. You can also switch out the static mesh and materials used on this ball from within the same viewport. These settings are all listed under details.

If you wanted to add a sprite or a paperflipbook to the ball, you’ll need to do that by adding a component on the physicsballBP. Make sure that you have the sprite facing the correct plane. You may need to experiment with this some, to make sure that it’s facing the correct way.

Again, make sure that you lock the ball to the specific plane that you’re working out of. If you don’t, the torque from the ball is going to cause it to roll in other directions. Make sure that you limit the movements to the y-axis as well.

Another thing that you will want to change is what the default gamemode is. Since you want the 3D ball movement to take control, you’ll need to go into the project settings and change the default gamemode into the rollinggamemode.

Keep in mind that since the ball is ran off of torque and paper2D doesn’t really have that functionality, you may need to work a bit with your project to make it run smoothly. Another suggestion I’d like to give you is to not package and develop this for mobile, at least not right now. It may work for you, but it will more than likely make the game lag on a mobile device due to the physics involved with the rolling ball template.

I hope this information is helpful, thank you for answering my questions I had previously. :slight_smile: