|
Grafikimon Oh
Grafik Design
Join date: 1 Feb 2007
Posts: 35
|
02-05-2007 16:10
I am building a weird kind of experiment which some may have been wondering at which has a trampoline at its base that should throw someone based on the velicity they hit it at. There is a giant spiral there that should give me enough hight but how would I have it detect the fall speed then give the faller a negitive velocity upon impact with it.
I used this script so far but it requires a touch. And ends once the initial lauch happens:
default { touch_start(integer num) { llPushObject(llGetOwner(), <0, 0, 100>, <0, 0, 0>, 0); } }
I don't mind a touch but I rather have people standing on it before it launches them.
Thanks
|
|
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
|
02-05-2007 19:58
maybe try the "collision_start( integer num_detected )" event in place of touch?
|
|
Grafikimon Oh
Grafik Design
Join date: 1 Feb 2007
Posts: 35
|
02-05-2007 20:49
thanks.
that works.
I notice that it plays the fall down and get up animation before it registers that i am in contact with it. Can I use this to actually bounce? I wanted to have it determine the velocity at impact to then bounce me back up.
I wanted the trampoline to based on the physics instead of just tossing me up a predetermined height each time.
|
|
Grafikimon Oh
Grafik Design
Join date: 1 Feb 2007
Posts: 35
|
02-05-2007 21:26
I was looking at this code from the beach ball. How would I apply this as my vector
vector impulse = llGetPos() - llDetectedPos(0); // Vector between avatar and ball impulse.z += 7.0; // always add some 'up' impulse = llVecNorm(impulse) * 7.0; llApplyImpulse(impulse, FALSE); llApplyRotationalImpulse(impulse * 0.25, FALSE); llTriggerSound("bounce_2", 0.5);
|