Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Start -> End position/rotation is off.

Dave Zeeman
Master Procrastinator
Join date: 28 Jan 2003
Posts: 1,025
03-29-2003 20:20
I'm trying my best to make a pinball table, but creating the paddles are the bane of my existence! What I'm currently trying to accomplish is making sure that the paddle, after going through all of it's script calling,

**
(which basically....
turns it physical, pushes a force on it, then after a short llSleep(), turns off physical [thus there is no more force and it stops at the held position] then when you depress your button [I use the "edges" control option], it turns physical again, is pushed back in the opposite direction it was originally pushed by the same amount of force, and then has physical turned off again)
**

ends up in its original position. I do this by ending the above script by turning off the physical status, and then setting it's original Rotational and Positional vectors, which were found before the script was even started, and hard coded into the script. Yet, it doesn't actually set to the correct spot. The paddle is hinged to a cylinder, this may have some effect on it. I've also used a listen function that, when I commanded, told me what the current position and rotation of the object were. I took down these numbers before moving the object, and then after it moved I called for the numbers, and got the same for both position and rotation, however, the object was CLEARLY off course!

Is there something other than Position and Rotation that affect where a non-physical object is placed in world? Or is this merely a bug?
Andrew Linden
Linden staff
Join date: 18 Nov 2002
Posts: 692
04-02-2003 20:45
Is the paddle connected to the cylinder with a "hinge-joint"? Or is it simply "linked" to the cylinder?

You'll have to be careful when combining joints and impulsive scripts, especially if you tell the script to push the jointed object in a direction it isn't allowed to go.

As for rotating linked objects... I'd try using the llRotLookAt() call (which is at this very moment not working, but a fix should be in tomorrow) in conjuction with a llMoveTo(). It should allow you to keep the whole paddle physical at all times.

By carefully picking the look-at rotations of the two states, and mayby putting pins which the paddle can bump against to prevent it from going too far, you might be able to get it to work. It sounds like an ambitious project -- good luck.
Dave Zeeman
Master Procrastinator
Join date: 28 Jan 2003
Posts: 1,025
04-03-2003 20:47
yeah, the problem is that if there are pins there to stop the paddle, they'll also be there to interfere with the ball, which is what i'm trying to prevent.

I'll check out the script you've given me, thanks. :D
_____________________
llToggleDaveZeemanIntelligence(FALSE);
Philip Linden: Zeeman, strip off the suit!
Dave Zeeman - Keeping Lindens on their toes since v0.3.2!