Jump to content

Recommended Posts

Nevermind this, I saw a thing called Firespitter.

I know the engine and engine fx modules already exist but what do I put in my plugin code to make a part produce thrust? I'm trying to figure out how the stock engine module works but I'm having issues with that because I can't see the source for it. I at least know it increments/decrements a vector based on throttle and fuel input somehow and the api documentation at the wiki isn't showing the somehow.

Edited by bananasrawesome
Problem solved
Link to comment
Share on other sites

  • 2 weeks later...

The following methods add forces to a part (thrust):

part.addForce(Vec3 force)
part.addForceAtPosition(Vec3 force, Vec3 pos)
part.addImpulse(Vec3 force)
part.addTorque(Vec3 torque)

Those mostly link back to the low-level Unity Rigidbody add-force methods.  You can read up on those:  https://docs.unity3d.com/ScriptReference/Rigidbody.html

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...