- Home /
Remove Drag/Friction
I have some objects that are supposed to move around the stage "floaty". I have looked everywhere i can think of and i just cannot make them move with less drag or friction. To note:
these are unity 2d objects not colliding with anything (also tested, and needs to work when colliding with themselves)
the Rigidbody2d is set to fixed rotation and linear drag = 0.
they are set Gravity Scale = 0, so that they may freely move around (this is supposed to be seen as top-down).
They have a physics 2D material set to friction 0 and bounciness .5
I can update with more info as requested, but at this point i'm not sure what information would be useful.
Answer by DiegoSLTS · Oct 18, 2015 at 01:05 PM
I just did exactly (and only) that and the object moves without any drag. How are you moving the object? Does it have a collider? Is it colliding with something else?
If it's colliding try adding physics2D materials to each collider, setting the friction to 0 in both of them.
The objects each are built from a common prefab and have a circle collider 2D on them and a Rigidbody 2D. I am placing them close enough to shove each other out of the way, and they just slowly move to the sides and then stop moving. They have a physics2D material that applies friction 0 and bounciness .5.
I have also tested them by applying force to them programatically (this was on click, for a small time frame)
In all cases to immediately slowdown regardless of whether or not they are touching anything.
Can you share the scene where this is happening? Or a little project where this can be reproduced?
At this point i'm not sure if its just a case of the physics engine just not doing what i think it can do or what, but here is my current project completely stripped down.
once run, a left click by the player will spawn a "cell" prefab, which is stripped to just be a circular sprite with a circle collider, rigid body and the other required parts.
If you place 2 nearby they nudge each other out of the way as expected. However, they stop after they cease touching.
Now, from being set friction-less and to have 0 linear Drag, i would expect that these objects would continue drifting since they still have momentum and are not touching anything with friction on it.
link to 7z of project: https://drive.google.com/file/d/0B8-nuQ404VzTOGFWNG92$$anonymous$$E9SLTQ/view?usp=sharing
Your answer
Follow this Question
Related Questions
Using child colliders with rigidbodies/joints in 2D 0 Answers
Ball bounces at different heights when it shouldn't 0 Answers
Create a simple constantly swinging vine/rope 1 Answer
Rigidbody2D freezes 1 Answer
AddingForceAtPoint not doing anything 0 Answers