Advertisement Jump to content
p3nd_

java script problem: I want to make player collision for my game pong

Recommended Posts

Im a beginner programmer in java script (hobbyist) and im trying to replicate pong in the p5.js web editor. i have this problem that i cant solve with the player colision, i tried several things. i ahve the distance from the player to the ball but i dont know how to use that information to make a colision detection.

i provide you the code below:

https://editor.p5js.org/p3nd_/sketches/rkAEBmgeV

would be very happy if i would get help.

Edited by p3nd_
forgot the tags

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!