Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetForce() and collisions - No 2

Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
12-30-2007 09:12
I'm still working on my breakout game - but didn't get THAT far :)

I'm using a ball, status set to physics and use llSetForce to accelerate it. I'm trying to simply bounce it off the top and bottom of a box.

But what happens is, that once the ball hits either wall, it begins to spin and thus the next time I apply llSetForce() the direction changes so the ball will go off-world within 2 or 3 bounces. (I'm using the global-version of llSetForce() setting local to FALSE, but still the force is applied to the ball's local axis).

How can I prevent the ball from spinning/tumbling when it hits another object? means, keeping the local rotation steady?

I tried to apply llSetRot()/llSetLocalRot() but these two commands delay the script for 0.2 seconds so the ball stops before it's accelerated again and this doesn't look the way I want it to...

Thanks for your help pholks! :)
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
12-30-2007 10:20
What about:

llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE);
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
12-30-2007 10:30
/me blushes...

should have read the wiki-page a little more thorougly...

Thanks Jesse!