- Home /
Rigidbody starts moving without an applied force
I am a newbie in Unity. My problem is about the Player Rigidbody in the Roll-a-ball tutorial. When I start the game, the Rigidbody (ball) starts moving without any button being pressed. The rotation of the ground is 0 in all axes. I know this must have a simple solution but I couldn't find it. What might be the problem here? Sorry if this has been asked before, but I tried to find a similar question to no avail. Thanks in advance for any help.
Yes, it is applied. The ball falls off from the edge of the platform when there are no walls.
Can you show code or pictures to see what's happening?
Answer by Pfo · May 05, 2015 at 03:17 AM
I'm new to Unity too and I had the same problem with the FPS controller. I decided to write my own code and found that Input.GetAxis Horizontal and Vertical always had input when I wasn't pressing anything.
Anyway, the fix I found was to go to Edit->Preferences->Input (or something like that) and rename the latter Horizontal and Vertical axes for joysticks to HorizontalJoy and VerticalJoy. For some reason the joystick axes are always getting input. It's so annoying. This fixed my problem.
Thank you for your response. Input's path is Edit->Project Settings->Input. I changed as you said (rename joystick axes), but nothing changed. Then, I changed 'Dead' value on both Horizontal and Vertical axis to several values. That didn't work, too.
Answer by kokisan · Sep 16, 2016 at 10:48 PM
I know its old but I encountered the same problem.
My solution was in changing physics values in Project Settings -> Physics -> Gravity
Hope that helps.
Your answer
Follow this Question
Related Questions
Roll A Ball: Can't get ball to move. Did not make same error as earlier posters. 1 Answer
Method for giving a ball momentum through a swipe 0 Answers
Top Down car/vehicle movement 1 Answer
how get bow to add more force over time 0 Answers
How to make a ball capable of rolling around a loop the loop? 1 Answer