Single Player Paddle

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

  • ericzingelerericzingeler Member Posts: 334
    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.
  • slappyclown17slappyclown17 Member Posts: 6
    Thank you
Sign In or Register to comment.