Thursday 6 April 2017

Bouncy Teleportation Ball


In Unity We had a large amour of balls and we had to add our own custom script to it so what i did was use the Random Range to set the ball so on contact with other balls it will teleport upwards and horizontally within a set of parameters
The add force part of the code is what makes the ball bounce The If statement is what controls the colliders so on contact with a tagged ball it will activate the next part of the script which will teleport the ball within the parameters. They are decided by a minamum and maxim value as shown within the brackets matched to the X,Y,Z axis

No comments:

Post a Comment