Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Friction!

Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
09-25-2004 10:49
Has anyone ever tried to implement friction or drag effects on an object before? It's a bit bizarre, the way physics works in SL, since there doesn't seem to be any friction with the air, although we do apparently have a terminal velocity anyway. :D

Anyhoo, I tried implementing a bungee cord, but without any sort of friction, instead of losing energy, the spring just started accelerating wildly out of control. I expected to end up dangling relatively statickly under the platform after a few bounces: instead, I ended up six sims away, face-down in the muck. :D

I tried applying a counter-force proportional to the velocity of the avatar, but that didn't seem to make much difference. It just made it more unpredictable. I hate math. :D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
09-25-2004 13:05
I actually did something similar for my marbles in the GameDev. I got a very very smooth oscillating effect in them. You are using nothing but ApplyImpulse, right?
_____________________
</sarcasm>
Siro Mfume
XD
Join date: 5 Aug 2004
Posts: 747
09-25-2004 13:52
Ever try making use of the Vehicle types without using llTakeControls? I haven't yet, but it seems to me that that's a ready source of friction...
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
09-25-2004 16:11
I barely remember now, how I was applying the forces to the bungee-jumper... probably llApplyImpulse, or god help me, llSetForce. :)

I never thought of vehicles... huh, I'll have to prod around at that a bit, see what falls out. Thanks! :D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Siro Mfume
XD
Join date: 5 Aug 2004
Posts: 747
09-27-2004 07:23
Well you'll notice from the standard linden airplane script you don't have to be in control of the vehicle for it's physics to apply or for friction to stop it. So basically you can use the vehicle engines to apply force via a vehicle motor in a pre determined method, like a bungee cord, then have friction and such take over according to your settings.
Hiro Pendragon
bye bye f0rums!
Join date: 22 Jan 2004
Posts: 5,905
09-28-2004 03:18
Friction is built into vehicle scripting... erf, forget the setting. If it's vehicles you're worried about, ask in the vehicle section.

Physical objects naturally have friction against solid surfaces, too.
_____________________
Hiro Pendragon
------------------
http://www.involve3d.com - Involve - Metaverse / Emerging Media Studio

Visit my SL blog: http://secondtense.blogspot.com
Apotheus Silverman
I write code.
Join date: 17 Nov 2003
Posts: 416
09-28-2004 09:18
My swarm script simulates friction via a timer without resorting to vehicle physics if you're interested.
_____________________
Apotheus Silverman
Shop SL on the web - SLExchange.com

Visit Abbotts Aerodrome for gobs of flying fun.
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
09-28-2004 10:49
Friction is built into SL already. Just change the material type and you're good to go. I've never bothered to quantify it, but Glass seems to be more slippery, as one would expect from the name alone.
Air isn't an object though, so it has no material type.
Hmm is friction different from atrition or however you spell it? My inglish si teh suck!
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
09-28-2004 23:58
From: someone
Originally posted by Eggy Lippmann
Friction is built into SL already. Just change the material type and you're good to go. I've never bothered to quantify it, but Glass seems to be more slippery, as one would expect from the name alone.
Air isn't an object though, so it has no material type.
Hmm is friction different from atrition or however you spell it? My inglish si teh suck!


Yeah, someone posted this onto the Wiki, if someone cares to find the relevant articles, appears the material settings actually go down a whole load deeper, then usually thought.

-Adam
_____________________
Co-Founder / Lead Developer
GigasSecondServer
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
09-29-2004 00:30
You mean this?
http://www.badgeometry.com/wiki/material
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
09-29-2004 01:56
From: someone
Originally posted by Eggy Lippmann
You mean this?
http://www.badgeometry.com/wiki/material


I knew someone would want that page some day. :D
_____________________
</sarcasm>
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
09-29-2004 11:40
Thanks, Apotheus, everyone. :D

I think where I was probably going horribly wrong was that I was, indeed, using llSetForce instead of llApplyImpulse. No wonder things got so out of hand. :D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"