Hello guys. I am new to unreal engine, I’m trying to create top-down football game, i would really appreciate your help to help get an understanding of how to make it.
I’m trying to create player object(controller) and ball object. When player has no ball he’s not able to shoot or pass other player but he’s able to gain possession of free ball that is laying around the field. I have no idea how to encounter picking up the ball and then tell player that he has possession and that the ball is in control of player and follows his position as it is in real football game (dribbling). With that, i have also no clue how to tell the game with possession when you press G on your keyboard, the possession disappears and the ball gets speed towards the direction between the ball’s current location in the players possession and cursor. And the further away the cursor is the more speed is added to it. I would be really happy if you guys help me get some ideas to do this for a silly old guy. I wish you all a great day! Johnny
You’re asking a lot here, and reading this you seemed to have overwhelmed yourself. I’d start by looking at one mechanic and segmenting it down. Forget working with two players at the moment. Focus on the ball working with one player.
Off the top of my head when the player runs (collides) into the ball this triggers an event. This would then be attached to the player, for example… Now you have to think, like you’ve rightly said how the player controls the ball. But achieving this is difficult, you would have to try various methods, I don’t have time to go through this at the moment, if I have time I’ll comment back. Hopefully someone else can help further. But in the future I would suggest breaking this down into at least one mechanic you can focus on.
Thank you for your answer, I was thinking of the possession same way, whenever the two objects collides, the player gains control of the ball.
I was working in Unity back then, but there were forces affecting each other when player “Picked up” the puck and it didnt work out really well.
What I was thinking about was to add to puck some offset from player postion and then maybe somehow copy players movement or just follow the feet.
But I really dont know how to achieve that kind of stuff or is it even right to go that way?