spwan and moving objects

Hi, I’m new to Unreal Engine, I’m making a simple game for Android, in this game, I’ve set the player character so that he can only move left and right and shoot. Now I want to spawn things like guns, catapults, etc. in front of the player so that they come towards the player and if the player overlaps with them, that object will appear in the player’s hand or next to him. For example, I spawned a weapon (image 1 & 2) I tried to move it with the AI move to node(image 3 & 4 - The target I added to the target actor was a blueprint in which I placed a box, and then I placed this box in the game environment behind the player, so that the gun might move, but it still didn’t move!), the weapon just spawns and doesn’t move at all!!!





Please guide me how to move the gun! I am new UE and I don’t know if the blueprint of that object should be an actor or pawn. please guide me. Thank you.

Is there a reason why the guns are pawns and move using AI? If you’re targetting mobile, I’d avoid that.

spawn things like guns, catapults, etc. in front of the player so that they come towards the player

I’ve assumed the player is facing world direction X (forward). Consider the following:

  • just a standard actor with no movement component:

  • items spawn:

Not sure how you’re picking spawn location - I added some random points based on the player location and orientation.

This can be done much better and optimised but does it looks about right so far?

1 Like

thank you so much bro, it works! thank you

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.