First we need to grab a pool ball texture. (I typed "pool ball texture" into google and clicked images) something like this will do.
Save this file to your computer.
- Fire up Unity and create a new project. Make sure you tick the package box "Physic : Materials.unityPackage". Call the new project "poolballDemo" or something like that.
- MENU -> GAMEOBJECT -> Create Other -> Sphere
- MENU -> FILE -> Save Scene As "poolballScene" or whatever.
- MENU -> ASSETS -> Import New Asset.. -> and browse to the texture you downloaded above.
- This texture will appear in the project window. Drag this onto the sphere and you should see the texture on the ball in the main display window.
- Click on the sphere and MENU-> COMPONENT -> Physics -> Rigid Body. In the Inspector pane you will see this new Rigid Body info appear.
- Click on the Camera in the Hierarchy pane and change the Transform Position of the camera in the Inspector Pane (on the right). Set X = 0, Y=-8, Z=0 This will allow us to see the ball better.
Click the RUN arrow.....
Now save your work :-)
Tomorrow and onwards we will add another ball, create the Pool table for our balls to sit on (ooerrr!), a cushion (that's a rail you N.Americans!) and get some collisions going!
Please follow us on Twitter at http://twitter.com/unitynovice
No comments:
Post a Comment