- Home /
How can i make artificial gravity for Kinematic Rigidbody?
Hello peoples. I wanted to know if there was a way i can make a rigidbody character have gravity in a zero gravity environment.
I am using a rigidbody that is kinematic because it does not bounce back when it collides with another rigidbody. But now i cant use rigidbody.velocity because i get an error saying object must be non-kinematic dynamic. Anybody have a workaround?
Thanks, love Sprinkles c:
Answer by fardinnn · Aug 08, 2013 at 08:22 AM
i think you most use non-kinematic rigidbody and for less bounciness use physicmaterial
Answer by Marksmir · Aug 08, 2013 at 08:21 AM
Umm I am pretty sure kinematic makes the object stationary so no there isn't a way around it and why can't you just turn on gravity for that object and turn it off for all the other ones?
I just want the rigidbody to act like a kinematic when it comes to interaction with objects, but be able to use forces like gravity. I have tried physics material and put bounciness to 0, but it still bounces. I guess im asking too much. :( The physics game engine is really great at replicating physics. With every action comes an opposite re-action, but i want to stop the re-action
Ok i forgot to tinker with drag and angular drag. I bumped both up to Infinity and no bounce. Sweet.
Answer by DeathPro · Jan 30, 2020 at 10:35 AM
private void Update()
{
if (isMoving)
groundTrans.Translate(Time.deltaTime * downSpeed * Vector3.down);
}
I have an object to do like so. Have Rigidbody on it and it's toggled with isKinematic. I figured out that I can do a trick like acting as gravity effects the object. Of course, maybe there could be better ways but I just get things done :D
My object had "Mesh Collider" and was not Convex. Unity does not support any more non-Kinematic objects with non-Convex Mesh Collider. So I found this way to handle the situation...
Any chance you could show me your variable values?
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
jump script : 2D 1 Answer
The rigidbody component in my object won't reset. 1 Answer
Gravity issue, player movement! 1 Answer
Rigid body speed not increasing. 1 Answer