- Home /
Too subjective and argumentative. UA is meant for specific technical questions.
Football - 2D
Hello,
I'm trying to learn about physical things and I wanna try to make a football game kind of. It's not gonna be advance, it's just about learning the basics mostly. So as the player uses CTRL to kick, the football doesn't react in a good way etc! I have tried a lot of different things with the colliders. The game is 2D by the way, using the Robot Guy controller from Unity Assets.
Any suggestion on making a decent football physic?
Test and see what I mean: CTRL to Kick
Please ignore the broken animation and graphics :)
The question is not specific enough to give a proper answer to :/
You can learn the basics by following the tutorials
When you have a problem you can single out, please make a new question about it and preferably show us the problematic bits of code.
Ifbyou need to have a discussion about how to make a specific kind of game, please use the Unity forums ins$$anonymous$$d.
Answer by el_kontexo · Jul 26, 2017 at 02:25 PM
(Your link seems to be broken. ) If you add a rigidbody to your football (if it doesn't already have one) you can use Rigidbody2D.addForce(); to move it. You can use e.g. a trigger Collider that is slightly larger than the player to detect if the ball is next to the player. Couple these two techniques and you should get something cool :)
Here is a link to the documentation for AddForce() https://docs.unity3d.com/ScriptReference/Rigidbody2D.AddForce.html And here is a decent tutorial on how to implement it: https://www.youtube.com/watch?v=Di0JOpwTZZU
Good luck!
this post is over 2 years old, it was bumped by Nose$$anonymous$$ills for some reason 2 days ago. Link is broken because the website doesn't exist anymore. I'm a lot more knowledge with Unity today but thanks for replying & helping out even if it's kinda late, Such a 'bad memory' thread ;)
Follow this Question
Related Questions
2D Animation does not start 1 Answer
PlayOneShot not playing sound 1 Answer
Animator - Stoping && Playing from Specific frames. 5 Answers
I've lost a 2D Animation Script 1 Answer