- Home /
Design 3D ping pong using unity
Hi i am beginner with using 3D unity , i have only 3 days to learn it and now less than 24 hours left to design my game , i have read the basic tutorials and some examples to start designing the game.
so far I managed to design the basic things but i just can't figure out , what is the script to make the players interact with each other !! i mean when player 1 hit the ball , player 2 should hit back ...... still have no clue how to do it . Could you please help me ??
the only way that i think about that to set the ball as a target then make player 2 moves to that target , but i don't know how to make the player move toward the target .
also, when player 1 hit the ball, it act like a football ,i added a force script into it .
basically now I have designed a football game with only one player !!!!
?? any idea please ?? i appreciate any help
THANK YOU
thank you so much for your help.
so basically let me tell you what i did quickly : 1- i add a 2 cylinder, as 2 player ( player 1 , player 2 ) 2- sphere as a ball 3- a cube as the floor
player 1 which is the user , i attached the ( $$anonymous$$OVE SCRIPT to it ).
player 2 which is going to move automatically toward the ball and hit back ( the part that i need help with )
the ball i attached a force script to it , so when player 1 hit the space bar it will call the component of the force script to add force to the ball ( it is not working yet!!!)
once again thank you !
Don't post an answer if it is no answer to the question. To add more details to your question use the edit button below your question or add comments.
Answer by timsk · Sep 28, 2011 at 03:20 PM
just set up the controls in the input, one with WASD the other with the arrow keys, make 1 set of controls move 1 paddle and the other set move the other?
Unless your thinking of networking the game over 2 computers, which is an entire subject on its own
Answer by supergamespawn · Sep 28, 2011 at 04:38 PM
don't forget to add rigid bodys and player controllers
But without the player controllers. Nobody wants player controllers.
Answer by scripter97 · Jan 11, 2012 at 07:12 AM
Hi I'm trying to make a "simple" game as an assignment for school and I've been thinking about something like a ping pong or space invaders game. What was the basic tutorial that you wrote about? Can someone recommend something?:D
Please don't go digging up old questions without anything new to add. Post your own question, or (since this is probably what I'd tell you to do anyway) search it on Google or the search bar here first.
Your answer
Follow this Question
Related Questions
how to make a player die on collision 2 Answers
ROLL a ball towards the player 1 Answer
Player flies PROBLEM 1 Answer
Make Ball Roll after Player Runs into it? 1 Answer
the code work bat is not push the ball but with speed of the character ? 2 Answers