Mon, Nov 25, 7:15 AM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Steering a vehicle


ockham ( ) posted Tue, 18 December 2001 at 11:22 AM · edited Tue, 19 November 2024 at 12:08 PM

file_246048.txt

Here's a script to make a vehicle (car, lawnmower, wheelchair) steer properly. You first set up the animation frames, and then translate the vehicle to where you want it at each frame. (Usually you can set just a few frames and let the spline take care of curving it between those.) Once that's done, apply this script, and the vehicle will end up rotating on the Y axis appropriately so that it appears to be steering into each turn. See notes in the script itself for more specific instructions and limits. I'll be adding a couple more features (like banking) shortly. The script is inserted here; its original name is STEER.PY.

My python page
My ShareCG freebies


ockham ( ) posted Wed, 19 December 2001 at 9:06 PM

file_246050.txt

Here's an improved version, which can bank or lean the vehicle as it turns. Extensive notes inside the .PY file.

My python page
My ShareCG freebies


DraX ( ) posted Sat, 12 January 2002 at 4:51 AM

Will this work for a Figure as well as a Prop? After looking at the script, it appears as though it's for Props only, though I could be wrong...


ockham ( ) posted Tue, 15 January 2002 at 6:35 PM

Well, I meant it to be used with a Prop, as in some sort of four-wheeled vehicle. But after some experimentation, I found that if you replace "Vehicle" with "Body" through the script, it works well on the currently selected Figure. I don't know what use this would be, except that it sort of looks like ice skating! The banking constant (in the function call at bottom of script) would need to be negative for that purpose, so that the figure would lean into the turns instead of outward as a car does. (Riding a bicycle would also need a negative bank value.)

My python page
My ShareCG freebies


DraX ( ) posted Tue, 05 March 2002 at 2:33 AM

..Actually, my original thoughts on this would be to have a superman-like figure flying, which would require some banking. Any chances of getting this script to apply "steering" and banking based on the Actor's position on the Y axis, as well? so that if it's moved up it will move along the X and Z axis in relation to the direction it's going in? I.E. the Actor turns up or turns down as it moves up or down?


ockham ( ) posted Tue, 05 March 2002 at 10:31 AM

Ah! It took me a minute to see what you're talking about. Like an airplane: nose upward when trying to increase altitude, nose down to dive. Will be easy to include that. I'll post that revision later today.

My python page
My ShareCG freebies


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.