Re: Pull an object
Posted by Rof on Fri Jan 21st at 5:00pm 2005
I'm not sure about phys_lengthscontraint, but I think that phys_spring can take an input that can set it's length.
So you could add a phys_spring that's is usually turned off.
Then when it comes to reset the catapult, turn on the spring, and
gradually shorten it (using multiple outputs and the "delay" field to
make the spring gradually shorter over ~30 seconds or so).
That should make it pull the arm more smoothly, and the fact that it's
a spring should make it less abrupt, anyway. (You might want to turn
the "force only on stretch" spawnflag on, that should prevent the arm
oscillating.)
Then when the spring has pulled back the arm, turn on the phys_lengthconstraint again, and turn off the spring.
You'll probably have to play with the timing and the spring constant, friction, etc., to make it look good.
[addsig]

Rof
member
210 posts
31 snarkmarks
Registered: Dec 3rd 2004
Re: Pull an object
Posted by Livett on Fri Jan 21st at 5:03pm 2005
I will give that a try now
Livett
member
164 posts
26 snarkmarks
Registered: Dec 24th 2004
Location: England
Occupation: Student
Re: Pull an object
Posted by Dred_furst on Fri Jan 21st at 5:14pm 2005
try getting a phys_thruster to push the catapault back down, then
re-enable the constraint when the phys_thruster hits a trigger.
[addsig]

Dred_furst
member
455 posts
106 snarkmarks
Registered: Sep 3rd 2003
Location: UK
Re: Pull an object
Posted by Rof on Fri Jan 21st at 5:23pm 2005
Hmm. You could set the spring length to be really long to turn if "off"
(that way, as long as you have "force only on stretch" on, it won't
interfere with the catapult operation).
And you might have to set the spring constant to a really high value to make it pull a heavy object. F = -kx, and all that.
[addsig]

Rof
member
210 posts
31 snarkmarks
Registered: Dec 3rd 2004
Re: Pull an object
Posted by Nickelplate on Fri Jan 21st at 6:26pm 2005
keep your original setup only add a spring that pullsthe trebuchet upwards. then the spring should let the end down slowly enough that It wont bust off the hinge.
[addsig]

Nickelplate
member
2770 posts
327 snarkmarks
Registered: Nov 23rd 2004
Location: US
Occupation: Prince of Pleasure