- Home /
Best way to disable gravity in rigidbody2d
I want to disable gravity in rigidbody2d for my character because I want my charcater can fly when got a special item
I change gravityscale=0 in rigidbody2d component then It work for disable my character fall down But when I use addForce for my character move horizontal it run straight away with no stop position.
Is there any solution for disable gravity can use addforce function and velocity for moving horizontal ?
Thank
Answer by SanSolo · Oct 04, 2014 at 07:03 AM
You might want to consider using kinematic. Documentation here. It is usually a good replacement for rigidbody in situations like this.
Your answer
Follow this Question
Related Questions
How to make a horizontal center of gravity in 2d ? 1 Answer
Jumping and reverse gravity with a Rigidbody2D (based on the Ruby tutorials) 1 Answer
Avoid moving platform pushing falling object 1 Answer
rigidbody2D gravity problem 2 Answers
i need help with the on collision script of rigidbody. 2 Answers