|
Daisy Rimbaud
Registered User
Join date: 12 Oct 2006
Posts: 764
|
12-04-2007 14:53
I was wondering if anyone knows of any generic scripts for doing bouncing actions using physics? If a moving ball hits an obstacle, how it bounces depends on its angle of impact, and I can't quite get my head round a moving ball can work that out. Any help would be appreciated.
|
|
Django Yifu
Beat Island Gaffer
Join date: 7 May 2007
Posts: 189
|
12-05-2007 04:04
_____________________
Tread softly upon the Earth for you walk on my face.
|
|
Daisy Rimbaud
Registered User
Join date: 12 Oct 2006
Posts: 764
|
12-05-2007 05:04
I think I saw that - but it deals with bouncing up and down. I'm interested in trying to get a ricochet effect, like a pool ball but in 3D.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-05-2007 06:28
I wouldn't know of any generic scripts, and I'm guessing that the physics engine isn't doing it for you...
you'd need to calculate your vector of momentum (easy), the surface angle of the object you hit & the angle you hit it at (not so easy), and the angle of reflection (easier than the previous step). that's not including calculations for rounded, or torured prims.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
12-05-2007 09:03
To elaborate, the physics in SL is about to change pretty dramatically (for the better). So whatever you try you need to do on the beta havok 4 grid, and then wait for it to make it to the main grid.
I suggest you start with something straightforward, like a bouncing beach ball, before you start getting fancy.
Things in SL don't bounce very much. Like the beach balls are all pretty flat. I experiemented with adding a boost on a collision. For that to work, you have to know the shape of the thing you are colliding with, though.
Check on you tube for the Hour Glass experiement to see what happens when you use plain, unadorned physics.
_____________________
So many monkeys, so little Shakespeare.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-05-2007 11:17
From: Lee Ponzu To elaborate, the physics in SL is about to change pretty dramatically (for the better). So whatever you try you need to do on the beta havok 4 grid, and then wait for it to make it to the main grid. anyone remember hearing about Havok 2? 3? just saying....
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|