3d side scroller projectiles?

Hi! I was trying to create a simple jump, run and shoot 3d side scroller. The only problem is I cant find a solution to make my character generate / shoot a simple projectile straight forward (or in this case right) from my weapon mesh. How would I be able to do this in blueprints?

i would create a new project with the first person shooter template and check out what they’re doing there.

exactly, I´m using the First Person Projectile to my 3d sidescroller game, check it out!

I tried to migrate it but I just don’t fully understand where to copy and place the nodes? Any Ideas or Examples Btw thanks so much for the fast reply, really helps :wink: !

Hello,

Once you have migrated your assets into your Sidescroller project, you’ll first need to set up your Fire input action. To do this, go to Edit->Project Settings-> Input and create a new Action Mapping. I used the right arrow key, but feel free to use whichever key you’d like. Keep in mind that if you use the right arrow key, you’ll have to go into the Axis Mappings and then remove the Left and Right bindings for movement, as these will interfere with the fire action.

After you do this, open up your FirstPersonProjectile blueprint, and ensure that you set the Sphere static mesh to the FirstPersonProjectile mesh (migrating the assets removes the mesh from the blueprint, so you just have to go add it back in). After you’ve added the mesh, select the Projectile component of the FirstPersonProjectile blueprint. Navigate to the Planar Movement section of the details panel and click the Constrain to Plane option. Set the X value of Plane Constraint Normal to 1.0. Leave the other values as 0. This constrains the projectile to the x-axis.

Now that your projectile is set up, you only have one step left. Go into your SideScrollerCharacter blueprint, and add your InputAction Fire event. Then, we want to SpawnActorFromClass. Set the class to FirstPersonProjectile. For the Transform, right click on the pin and select Split Struct Pin. Then, GetActorTransform and split that struct pin as well. Drag off of the Return Value Location, and do a Vector+Vector. Add some value to the X (so that it spawns a bit in front of the character) and some to the Y(so it spawns above waist level). These numbers are very flexible, so feel free to use whatever you’d like. Below is an image of the blueprint.

After completing this, you should be all set. Feel free to ask me if there are any further questions.

Have a great day

Edit: Fixed the issue! I just had my mesh attached under the wrong asset, but just as a last question would you have any suggestions or solution for how I would make a simple ai patrol blueprint?(ex. mario enemy back and forth) I imagine it would be through nav mesh or target points but is there any way to pull this all together in blueprint? I don’t want to be a burden, if you don’t have any suggestions don’t worry but thanks for everything! The shooter works great!

Typically, we ask that you post new questions in a separate Answerhub topic (just for future reference), but this is a simple enough question that I wouldn’t worry about it.

We actually have an AI Patrol tutorial. Have a look at this video: Basics of AI | Live Training | Unreal Engine - YouTube

Have a great day

I tried the same thing as mentioned above but i got an issue where the projectile would spawn behind the character when facing left, it would still move in the correct direction (as my character is also facing left).