DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Make a Ping Pong Game in Unity (Tutorial)
echo3D for echo3D

Posted on

Make a Ping Pong Game in Unity (Tutorial)

Whether you’re hosting a ping pong championship or need to change out assets for projects deployed on multiple platforms, echo3D makes it easy to do this by simply using an API key and updating in 1 place. Assets are stored on the echo3D cloud and called at runtime so you can focus on other things. Like ping pong. Or trying out more open-source projects on our Github.

In this tutorial, you will play ping pong against another player (or the other side of your brain!)


Click this link https://go.echo3d.co/b1Cm or scan this QR code to see the ping pong championship logo in AR.


Register

Don’t have an echo3D account? Register for FREE at echo3D.

Version

Unity 2020.3.25f1

Setup

  • Clone this repo, see the full README
  • Import the Unity SDK
  • Add the assets to the echo3D console from the Unity β€˜Models’ folder
  • Uncheck the Security box in your console
  • In Unity, open the GameBoard scene
  • Drag the echo3D script onto Background object in the Hierarchy
  • Add the API key and entry ID for each object in the Inspector

  • In the Hierarchy, make sure to the boxes are unchecked for the Sprite Renderer for Background
  • Adjust the metadata of the Background in the echo3D console. These may work for you: BackgroundImage: scale: .1, zAngle: 180, height: 1180, xAngle: 90, width: 1920, x: .1

Run

  • Press Play in Unity. Left player: w and s keys Right player: up and down keys

Switch Out Assets

  • Find new asset in the echo3D console (You can upload your own or choose from our library)

  • Get the API key and entries ID

  • Swap them out on the echo3D script in the Unity Hierarchy and see your assets change when you run in Play mode

Learn More

Refer to our documentation to learn more about how to use Unity and echo3D.

Support

Feel free to reach out at support@echo3D.coor join our support channel on Slack.

Sources

  • Ping pong background asset: freepik

Support

Feel free to reach out at support@echo3D.co or join our support channel on Slack. For additional troubleshooting, debug here.

Screenshots

More Tutorials

For more easy tutorials, check these out:


echo3D (www.echo3D.co; Techstars 19’) is a cloud platform for 3D/AR/VR that provides tools and network infrastructure to help developers & companies quickly build and deploy 3D apps, games, and content.

Top comments (0)

🌚 Browsing with dark mode makes you a better developer.

It's a scientific fact.