- Home /
How can I throw an object using accelerometer or tilt?
Can someone help me with this, I want to throw a cube in a plane using accelerometer, like when i shake my phone the cube will throw towards the plane then rolling...
Answer by flaviusxvii · Sep 04, 2013 at 06:00 PM
Let's break down your question a bit. It is much more useful to dissect your question and ask about parts that are very likely to have been answered before.
http://lmgtfy.com/?q=unity3d+accelerometer+input
http://lmgtfy.com/?q=unity3d+apply+force+rigidbody
Give those a look, try putting some of it together, and when you hit a problem you can't solve through searching, there are lots of people here ready and willing to help.
Good point, I had already written my answer, but you're right.
Answer by fherbst · Sep 04, 2013 at 06:00 PM
Easiest way and a good point to start: Make a rigidbody, turn off gravity, and make a script that applies the current accelerometer values as force each frame. Oh, and make a plane below your rigidbody.
Please accept the answer than, so that others can find it as well. And search first the next time...
well i tried it but unfortunately i didn't get what i really wanted to do, anyway thanks for your reply.
appreciate it :)
Your answer
Follow this Question
Related Questions
Determining a cube's face up 3 Answers
Is it possible to make emissive dice in Unity? 1 Answer
how to stop my cube when touch collider?? 3 Answers
Cube starts shaking when placed on a giant sphere 1 Answer
Bag Toss Unity Accelerometer 1 Answer