toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
Commercial / "Help Wanted"
›
[$] Coding/Programming or Logic Services
Single Player Paddle
slappyclown17
Member
Posts:
6
June 2013
in
[$] Coding/Programming or Logic Services
I am attempting to create a pong like game but I can't figure out how to make one of the paddles to play by itself. Can anybody help me?
Comments
ericzingeler
Member
Posts:
334
June 2013
You can simply move the paddle to the position of the ball.
If the paddle is moving up and down on screen (Y-Axis):
Constrain paddle.MotionLinearVelocity.Y to (ball.position.Y - paddle.position.Y)*[Speed]
[Speed] is > 1 (try 5 for starters)
This isn't very sophisticated, but will at least point you in the right direction.
slappyclown17
Member
Posts:
6
June 2013
Thank you
Sign In
or
Register
to comment.
Comments
If the paddle is moving up and down on screen (Y-Axis):
Constrain paddle.MotionLinearVelocity.Y to (ball.position.Y - paddle.position.Y)*[Speed]
[Speed] is > 1 (try 5 for starters)
This isn't very sophisticated, but will at least point you in the right direction.