x


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

more ▼

asked Sep 28 '11 at 03:13 PM

gbk123 gravatar image

gbk123
1 1 1 1

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 ( MOVE 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 !

Sep 28 '11 at 05:21 PM gbk123

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.

Sep 28 '11 at 05:23 PM Bunny83
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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

more ▼

answered Sep 28 '11 at 03:20 PM

timsk gravatar image

timsk
255 3 6 9

(comments are locked)
10|3000 characters needed characters left

don't forget to add rigid bodys and player controllers

more ▼

answered Sep 28 '11 at 04:38 PM

supergamespawn gravatar image

supergamespawn
26 3 4 5

But without the player controllers. Nobody wants player controllers.

Sep 28 '11 at 04:49 PM syclamoth
(comments are locked)
10|3000 characters needed characters left

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

more ▼

answered Jan 11 '12 at 07:12 AM

scripter97 gravatar image

scripter97
1

Please post your queries as comments, not answers.

Jan 11 '12 at 07:24 AM venkspower

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.

Jan 11 '12 at 07:25 AM syclamoth
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x804
x169

asked: Sep 28 '11 at 03:13 PM

Seen: 1070 times

Last Updated: Jan 11 '12 at 07:25 AM