how to make basketball shooting game?

I actually doing a game where shoot a cat into a toilet. Functioning the same way as shoot basket ball to the basket. The problem is I don’t know how to code at all? can any help please thank you. (this is my school project, due next week)

What kind of school would have you create a game when you don’t know how to code?

The easiest way (in my opinion) would be to:

  1. Create a cat prefab with a Rigidbody component.
  2. Move the camera with the mouse (search for mouseLook)
  3. When you click the mouse (http://unity3d.com/support/documentation/ScriptReference/Input.GetButton.html “fire1” is the left mouse button, or ctrl.) Instantiate (http://unity3d.com/support/documentation/ScriptReference/Object.Instantiate.html) your cat, set its velocity (same link as Instantiate) whatever speed you like.
  4. Put a cube or sphere, (any shape will do) into your basket (toilet) and set it as a trigger. Whenever the cat hits the trigger (http://unity3d.com/support/documentation/ScriptReference/Collider.OnTriggerEnter.html), increase points. (If you have points)

Hope I helped.

hey thank, it does help!

will this work in 2d view? forget to mention that! stupid me!

Sure, you’ll just have to lock movement/rotation on certain axis. See configurable joint: http://unity3d.com/support/documentation/ScriptReference/ConfigurableJoint.html

Specifically the motion and angularMotion variables.

thank bro!

Instead of score how would I make it change level? Do i have to create new set every level? or new scene?

It depends on what you mean by level. If something changes drastically, it would probably be a better idea to change scenes, but if its only minor (like distance) then you can do that through scripting.

yeah just like distance, size of the cat, and size of the toilet

Well… this is kind of a vague topic, but every level up, you can just Translate your toilet back and do whatever else needs to be done to increase the difficulty.

If this seems difficult to you, and you don’t have time to finish it (it is homework after all) you can still make every level into a scene. Its just… not recommended. Just remember to save anything you need to keep in PlayerPrefs if you choose to use the scenes.

will it work if i created all this into several different scene, then everytime the level change the scene change?

Thats what my second paragraph was about. If you make everything into different scenes, you can use PlayerPrefs to carry information across different levels.

k thank

now, I am kinda stuck. so where do i find mouse look? and for the the fire button and the instantiate do you put it as two different script?

and for some reason the cat just fall right through the platform…