- Home /
Drag and throw ball
As the title suggest I want to drag and throw ball in which finger swipe in 2d game.
For this I used spring joint as this post suggest but at present it creates more bounciness from touch point.
How to drag and throw 2D objects?
My component value represented in following image that I have attach to my ball object.
So how to stop this bounciness? I want only that much bounce that looks normal and player can able to throw ball.
Answer by fafase · Jun 03, 2014 at 07:27 AM
You can control the bounciness using the Physics Material2D, you are not using nay for now.
Bets is to create a new one with right-click->create->PhysicsMaterial2D then you are given 2 values only Friction and Bounciness and they do exactly what they say. Then add it to your Collider and you will see differences.
Best is to create one for the ball and one for the ground, the engine will take care of the rest.
You don't understand my question. At present there is no ground available. I mean bounciness by oscillation at joint point. I create a joint on touch down and release on touch up. $$anonymous$$eans ball behaviour is more springy at joint point that I want less.
Your answer
Follow this Question
Related Questions
Object dragging at manual point 2 Answers
Create sprite renderer using custom material 2 Answers
Game Development Approach 0 Answers
Vector3 as Constant in Script 1 Answer
Terrain Handling For Performance Improvement in 2D Game 0 Answers