|
Connor Trudeau
Registered User
Join date: 5 Aug 2006
Posts: 5
|
09-26-2006 16:38
I'm having a little trouble understanding how to get this script to do what I want. Basically, I want one object to push another. Imagine a ball sitting on a trampoline. The ball is physical. The trampoline has this script inside: float force_amount = 1.5;
default { touch_start( integer num_d ) { llSensor( "Ball", NULL_KEY, ACTIVE, 1, PI ); } no_sensor() { llOwnerSay( "no ball" ); } sensor( integer num_d ) { llOwnerSay( "push ball" ); llPushObject(llDetectedKey(0), force_amount*llRot2Up(llGetRot()), ZERO_VECTOR, FALSE); } } This script works when the ball is already in motion. If you click the trampoline, it will push the ball. However, I want it to also push balls which are lieing still at the moment. So... I tried substitute "PASSIVE" where it says "ACTIVE" and the sensor finds the ball. But the push doesn't seem to work. Is there some restriction using llPushObject on an object that has come to standstill?
|
|
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
|
10-19-2006 00:19
Pushobject does have some restrictions, I would try having the balls themselves use applyimpulse at an upward angle when they collide with the trampoline.
|
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
10-19-2006 21:48
From: Connor Trudeau Is there some restriction using llPushObject on an object that has come to standstill? I have had similar difficulties. With sensors. Sensors apparently have a difficult time detecting stationary objects, unless they have an active script in them. I have a note-card that details what object types various sensor settings will and will not sense. If you like, I can look it up next time I`m in-world, and attempt to find relavent data to post.
|