About Store Forum Documentation Contact
Donations:
207$/mo



Post Reply 
Friction
Author Message
Driklyn Offline
Member

Post: #1
Friction
Does friction work properly?

For instance, if I call addVel once on a ball actor, the ball begins to roll and continues to do so, decreasing ever-so-slightly (and I do mean ever-so-slightly) in velocity over an extremely long period of time. The ball does not stop due to friction.

Setting all friction values to 100 for all PHYS_MTRL's does not seem to do anything. The velocity decreases at the same slow rate as when all friction values are set to 0.

Tried tweaking for a few hours already using an empty room with a single ball in it, no results. I've tested with the room using "Embed into Terrain" and using OBJ_STATIC, but there's no difference in the results.

I would like the ball to stop rolling rather quickly.

Changing the bounciness values works fine. I can have the ball bouncing all over the place, but that's not the result I desire.
07-21-2011 09:41 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #2
RE: Friction
Anyone have any ideas?
07-23-2011 07:07 AM
Find all posts by this user Quote this message in a reply
Dampire Offline
Member

Post: #3
RE: Friction
I think rolling ball must not stop due to friction, because ground plane very smooth and it's rigid body. Remember bearing box. I'm not sure, but try to modify "adamping" parameter.
07-23-2011 07:34 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Friction
I'm not sure friction affects "rolling", shouldn't it affect only "sliding"?
Maybe you want to use "damping" and "adamping" instead?
07-23-2011 01:17 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #5
RE: Friction
Ah, yes, completely forgot about angular damping. This does the trick. Thanks guys!
07-23-2011 08:11 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #6
RE: Friction
Just wanted to note that I figured out more about friction. It does indeed affect ball actors.

For instance, this code disables friction altogether so that all actors slide around like they're on ice when they're pushed:

Code:
Physics.material[PHYS_MTRL_DEFAULT].frictionMode(PhysMtrl::MODE_MIN);
Physics.material[PHYS_MTRL_DEFAULT].frictionStatic(0);

I'm not sure why I didn't have the ice effect before, but I think I might not have been using MODE_MIN.

I found out that, although in the header comments it says 0..Inf for the range, it really only uses 0..1. Anything above 1 appears to give the exact same effect, which is why when I set the value to 100, nothing changed.
07-24-2011 07:34 AM
Find all posts by this user Quote this message in a reply
Post Reply