- Home /
Don't script to spec/multiple technical issues
throw an object by swiping on it
I need help with creating a code that allows me to throw an object unto a specific direction which made by me swiping my finger from the object towards a random direction. When I release my finger the object shoots, and when i start the touch till the I stop the touch a raycast should be made with an origin and an end point and the longer the raycast the stronger the object shoots.
more like a ball shooting into a goal.
I'm not an expert in unity3D but I need some help with the code. Thanks in advance
Unity Answers does not write scripts for you. We answer single, specific technical questions to help you write your own code. Start by exploring the many answers already on Unity concerning throwing an object by swiping. Here is one answer:
http://answers.unity3d.com/questions/522173/add-force-based-on-swipe-speed-direction-curve.html
If you get stuck, we welcome your single-issue, specific questions. Please include your ongoing code attempt.
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Why Isn't My Raycast Working? 3 Answers
Joystick Raycast Problem? 2 Answers
Can I fake physics? 1 Answer
How to touch select 3D objects 2 Answers