A net practice game for Cricket in VR.
https://www.youtube.com/watch?v=zXA498fVVYE
Download the builds folder and run the EXE file. Ensure that you have HTC Vive plugged in to your PC.
Note: All files with suffix 1x or @1x are meant for the pitch with correct dimensions.
- Ball Launcher - Instantiates ball from the ball launcher device
- Ball Manager - Manages the functionality of ball which gets instantiated i.e. when it hits the bat, the trail behind it, when should it get destroyed, etc
- Ball Path - Script is attached to bat and controls the force and direction of ball
- Boundary - Script to draw the boundary. However, it has not been used and a 3D model was created instead;
- Bowling Manager - Stores user bowling preference
- Controller Manager - Grabs information about the controller
- DestroyMe - Global script to destroy GameObjects in the scene
- DestroySpin - Because spin has been added to ball using force, the ball continues moving in the direction of the force added and hence causes eccentric behaviour. This script destroys the balls not hit by the user if they go past the stumps.
- FireworksManager - Adds text like milestones achieved during the game and also generates the fireworks when a six or a milestone is achieved.
- GameObjectManager - Re-instantiates objects like stumps if they fall down or get hit by bat or ball
- GetBowlingType - Takes the user input value and passes it to BowlingManager
- GetName - Grabs users name and passes it to Player Manager
- GetScene - Grabs user input whether he/she wants to play on @1x pitch or @2x pitch
- GetUserInput - Calls appropriate script based on scene to grab user input
- Laser - Generates laser pointer from the controller
- NameManager - Stores the user name for the main scene
- PitchTrigger - Adds SpinBall script to the instantiated ball
- PlayerManager - Stores name and is passed on to the next scene
- SetBowling - Sets the bowling in the main scene
- SetBowingText - Changes the text to reflect what type of bowler it is
- SpeedManager - Computes speed of the ball
- SpinBall - Spins the ball
- StumpsManager - If the stump get hit by ball or bat, it sets the score to 0 and calls GameObjectManager
- TextManager - Contains all methods to change respective in-game text
- Transparency - Random script. Not used anymore. Was meant for adding transparency to the ball. Ended up using in-built shader from SteamVR
- VariableManager - Stores information about all the variables