How to use a 2D sprite as a weapon in a 3D FPS?

Hello, I have been trying to figure out a way to use a sprite in place of a weapon, or 3d model for a weapon, in an fps formatted game. I am also interested as to how to create enemy ai with 2d sprites. My goal is to have an fps similar to Doom 1/2. Thank you.

Hey Alexanderiii,

I like where your going with this!! First of all make sure your using the 1st person template and not a 2D template.

Open up the character BP (firstpersoncharacter) and make sure your in the viewport.

Add the paperflipbook component (top left) attach it to the scene root. As far as the sprite making, importing and using flipbook, I can elaborate more but that’s a topic in itself but if you have questions about I can answer. For me i’m using Wolverine from MvC2

Set your sprite to what it is that is your weapon. After you may want to rotate and position the sprite in front of the camera so it looks like it is a visible element of the camera. also delete the other attached components, i left mine in the picture to better illustrate the capabilities.

And that basically it on how to add the sprites to 3d games. You can use this set up for a numerous amount of actors like your enemies. to make everything flow and look cohesive like doom has to do with the BP programming of the sprites. Which I can help with specifically.

also I just realized you posted this years ago

And i’m here yet more years later! I’m not OP but your answer was just was I was after. How would you then set the flipbook to animate when fired? Also what about different animations, like a reload or idle?

Thanks and happy 2019!

Hey! Another half a year late but I’m sure this might help someone. You need to look into how flipbooks are used: Paper 2D Flipbooks | Unreal Engine Documentation
Then since the flipbook is in the character blueprint you can change it inside the blueprint editor (or C++ but I’m only used to BP). You can change playback speed, playback position etc. by referencing it in the BP. You can also check which frame the flipbook is on (by using the Get_Playback_Position_In_Frames from the flipbook component reference), which is really useful if you have like an attack animation, and want to fire in the middle of it.

If anything is unclear or anything just reply and I’ll try to answer to my best abilities! :smiley:

EDIT: I’m making a first-person 3D RPG with 2D Flipbooks sword, bow and spells etc so I know how to work around this :wink: