Quantcast
Channel: Answers for "How to make player (sphere) shoot the ball (another sphere)?"
Browsing latest articles
Browse All 4 View Live

Answer by robertbu

Given that both the player and the ball are spheres, you can do something like this: function OnCollisionEnter(col : Collision) { var dir = (col.transform.position - transform.position).normalized;...

View Article



Answer by ChrisSch

You can add the force based on the contact.point normal, at the contact.point. Here's the contact points reference page. http://docs.unity3d.com/ScriptReference/Collision-contacts.html This might come...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images