AR Basketball (AR Foundation: ARKit, ARCore) — Unity Asset
AR Basketball — Unity Asset and Sport Arcade Game Template which combines Augmented Reality and Basketball Mechanics for Mobile Platforms: realistic physics of basketball net & ring, ring growing & hoop movement, advanced scoring & audio systems. AR Safety First.
During an encounter with a target, a player may throw the ball by:
- tapping any point on the screen (by default);
- flicking/swiping the object from the bottom of the screen up toward the target.
Both modes form different speed and throw direction based on the last position of finger, what makes the game even more interesting. Toss Diligently and Try to Get the Best Score by Hitting the Basket without touching the Ground.
Contents
AR Engine
The game uses 2 AR Engines with auto selection:
- AR Foundation (ARCore, ARKit) with the next features:
- Real Plane Detection (includes tutorial, visual plane confirmation/resetting, placing the game around the player).
- AR Safe Zone. The player needs to stay in the Safe Zone to avoid accidents during the game and continue the game itself! The player will be notified when leaving the Safe Zone. Learn More on the page of AR Shadow.
- AR Onboarding UX with Transparent Video Manuals & AR States.
- AR Light Estimation: estimates light data in physical space and applies it to game space.
Learn More on the page of AR Shadow.
- AR Camera Lite will be used when AR Foundation is not supported by the mobile device. It’s also used when Testing in Unity Editor: the game in Editor is always run with this Engine.
Package Contains
- Unified Demo Scene for both AR Engines with Tutorial.
- AR Throwing (docs) and Throw Object 3D (docs).
- AR Camera Lite (docs) and Sensor Camera (docs).
- AR Shadows (docs).
- Menu Scene with AR Safety Tutorial.
- Permission Scene with Camera Permission Request using free Native Camera.
- Loading Screen to switch scenes seamlessly.
Check the Map of Unity Assets to choose the product that best suits your needs.
Features of AR Basketball
Bring the enchanting Power of Augmented Reality into your amazing AR Basketball Game:
- 2 Bonuses: Ring Growing (Big Ring), Hoop Movement.
- 2 Throwing Modes with Throw Object 3D (docs): “Click” (Easy) & “Flick/Swipe” (Hard).
- 100+ Customizable Parameters (Points, Throwing, Bonuses, Sounds, Delays, etc.).
- Super Realistic Physics of a Basketball Net & Ring:
Bank Shot, Toilet Bowl Shot, Rimshot, Net Shot, Clear Shot… - Dissolving (Fading) VFX for All Game Objects.
- Dynamic Sound System: play Sounds based on speed, pitch, and volume factors of the Ball when it collides with Ring, Basketball Net, Backboard, Floor, Pole.
- Directional Arrow that points to the Current Target.
- Advanced Scoring System with Combos & Accounting Distance to Basket.
- UI Animations and Sounds: Clear Ball, Best Score, Current Score, Fail.
- Real-Time AR Shadows (docs).
- Mobile Optimizations:
- Object Pool for Throwing Objects to manage the memory,
- TextMesh PRO for Texts to update them when really needed.
Bonuses
You can get a bonus with 1 scored ball or with combo. Balls Count in Combo can be set in Unity Editor.
Ring Growing (Big Ring)
Ring Growing happens when the player scores 1 Clear Ball (without touching of Ring). When the Limit of Goals with Big Ring will be reached then the basket will be returned to the Normal Size.
Hoop Movement
Hoop Movement happens when the player scores 2 Normal Balls (not clear) and shows VFX with Explosion & Hoop Dissolving (Meshes & Shadows).
Movement contains 2 independent parts:
- Rotation Around Camera (Player) by target Angles.
- Changing of local Z Position by target step.
Basketball Net Demo
Video Demo below of Basketball Net is just an example of an Interactive and fully Touchable Basketball Net with 2 holes, using the Cloth component & the Skinned Mesh Renderer to provide a physics-based solution for simulating fabric.
At the same time, the complete AR Basketball project provides AR Safe Zone and the player will be given a warning about leaving the safe zone, the screen will be darkened and throws will be blocked.
Tutorial
This tutorial is relevant for AR Basketball 3.3+.
Tutorial for the previous version can be found only in the asset folder.
Getting Started with AR Basketball
Folders & Files in the package by default:
- Makaka Games;
- XR.
Steps
If you have any issues with the first launch then just Reach Support with Invoice Number and Get Help.
If you read this tutorial from PDF, first check the latest docs online to get actual information.
- Create New Unity Project with Unity 2021.3.21 & “3D” Template.
- File > Build Settings > iOS or Android > Switch Platform.
- Next Packages must be manually installed with Git & Unity Package Manager:
- Download and import AR Basketball into Unity.
- Warning Windows:
- Click “Import” to overwrite the Project Settings with predefined ones.
- Click “Install/Upgrade” for Package Manager Dependencies.
- Click “No” when enabling the backends for the new input system.
- Warning Windows:
- Next Packages are provided with Unity Package Manager, and they are already installed for this Asset by default. If packages are missing (Warning Window did not appear) then install them again with Unity Package Manager (with advanced settings enabled: “Pre-release Packages” & “Show Dependencies”):
- TextMesh Pro 3.0.6:
- Always Required: Window > TextMeshPro > Import TMP Essential Resources.
- AR Foundation 4.2.7;
- AR Subsystems 4.2.7;
- ARCore XR Plugin 4.2.7;
- ARKit XR Plugin 4.2.7;
- Editor Coroutines 1.0.0;
- Input System 1.5.1;
- Subsystem Registration 1.1.2;
- XR Legacy Input Helpers 2.1.10;
- XR Plugin Management 4.2.1.
- TextMesh Pro 3.0.6:
- Reopen Unity Project.
- Open Scene: Makaka Games > AR > AR Basketball > Scenes > Demo.
- Test in the Unity Editor or Build for Mobile.
Each Unity Asset included in AR Basketball has its own documentation in the target folder or on the website (the latest docs).
“$” Game Object
It’s a Game Controller. Here you can find the main control scripts.
How to Set Balls Count & Throwing Mode?
All the information about throwing you can find in “Throw Object 3D” Documentation.
3rd Party 3D Basketball Environment (Option)
AR Basketball (Unity Asset) is not related to the next optional assets, and it doesn’t include them and support is provided only by their publishers. The next assets are recommendations as additional stuff to inspiration and application in your unique game:
- HQ Abandoned School (Modular): 2 basketball areas (street playground & school gym).
- Basketball Essentials: collections of hoops and balls.
- School Gym: common school gym with basketball stuff.
Testing
Learn the Testing Section of AR Throwing.
Tested with Mobile Devices
- iOS on iPhone XS Max.
- Android on Samsung Galaxy A71.
Support
First, read the latest docs online.
If it didn’t help, get the support.
Changelog
Check the current version of AR Basketball on Asset Store.
The latest version will be added as soon as possible.
3.3:
Improvements:
- Pseudo AR: AR Camera Lite Prefab became a Prefab Variant of Sensor Camera 1.0 (docs);
- Native Camera 1.3.8.
3.2:
Improvements:
- Unity 2021.3.21;
- Throw Object 3D 5.2 (docs);
- AR Throwing 3.3 (docs);
- AR Camera Lite 4.3 (docs);
- AR Shadow 3.1 (docs);
- Native Camera 1.3.7.
Fixes:
- Editor Testing: Camera Rotation Sensitivity with Mouse for Different FPS.
3.1:
Improvements:
3.0:
Features:
- Game Version with AR Foundation (ARCore, ARKit) & Plane Detection. It will run by default if the device supports it, otherwise, the Game Version with AR Camera Lite will be run.
- AR Safe Zone for Game Version with AR Foundation. The player needs to stay in the Safe Zone to avoid accidents during the game and continue the game itself! The player will be notified when leaving the Safe Zone.
- AR Onboarding UX (AR Foundation) with Transparent Video Manuals & AR States.
- AR Light Estimation (AR Foundation): estimates light data in physical space and applies it to game space.
- Using of Native Camera to check Camera Permission before the Demo Scene.
- Button in Menu Scene: “Clear Data” (calls PlayerPrefs.DeleteAll()).
Improvements:
- Unity 2021.2.18.
- Modern Standards of Project Settings (based on New Unity Project).
- AR Throwing 3.1 (docs).
- AR Camera Lite 4.2 (docs).
- AR Shadow 3.0 (docs);
- Throw Object 3D 5.1 (docs).
- Unified UI Layout to match different resolutions.
- Soaring Style for HUD UI with Black Outline: no black panel behind anymore.
- Loading Animation for Start Button.
2.0 (Completely Rewritten Project & New Features):
- Unity 2019.1.14.
- AR Shadow 1.4 (docs).
- Throw Object 3D 4.0 (docs).
- TextMesh Pro.
- Hoop Movement.
- Dissolving (Fading) VFX.
- Shadow for Basketball Net.
- Improved Basketball Physics Material.