Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / 3D physics - no sphere shape friction?

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 8th Apr 2017 17:55
Eh?
No way to get any friction to affect a sphere.

I've tried these frictions with values across the range:

SetObject3DPhysicsFriction(CueBallID,0.8)
SetObject3DPhysicsRollingFriction(CueBallID,0.7)

I've also tried all options for SetObject3DPhysicsAnisotropicFriction()

I've tried the sphere collision shape, I've tried constructing a compound shape with a sphere shape, I've tried friction on the static surface, I've tried different masses, different sized objects, different impulses, tried kinematic collisions - nothing.

All my efforts tell me that these functions don't do anything. Swap out the sphere collision shape to other shapes and friction works. The sphere shape demonstrates collision, but not friction.

Other than applying braking impulses on the opposite vector, I'm as a loss.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 8th Apr 2017 18:02
Friction has to be applied to both objects that come in contact.
You need to apply friction to the static floor objects as well.
The coffee is lovely dark and deep,and I have code to write before I sleep.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 8th Apr 2017 18:19
Thanks for confirming.
Just to clarify - I need to apply rolling friction and friction to the floor? This seems to give me some actual friction at least.

Is there some sort of formula for applying friction values re. mass etc?
Aikiman
7
Years of Service
User Offline
Joined: 11th Apr 2017
Location:
Posted: 12th Apr 2017 01:07 Edited at: 12th Apr 2017 22:43
friction is really dependant on the smoothness/roughness of both objects and off course air friction which you can probably negate with most games (mind you drag is an important factor to consider with flying objects). Im not a physics guru but mass is more relevant when objects interact with one another and the force they apply to each other: F = m x a for example.

Login to post a reply

Server time is: 2024-09-30 01:26:37
Your offset time is: 2024-09-30 01:26:37