What are VectorForce, BodyForce, BodyGyro, and other physics options?

I am a new programmer, and recently came across the Roblox physics (at least I think they are) objects. There are so many of them and I am overwhelmed. I looked in the API and read the article about them. After reading them, here I am, still lost on the concept of those physic objects. Can you explain what they are, what they do, and an example of their use (use is optional, I just think it will better help me grasp the idea)?I am sure I am not the only one with this question.

TLDR

Can you explain what they are, what they do, and an example of what one might use them for?

Well…

AlignPosition - Used to move the object it’s attached to towards the designated position
(ex. Moving a part to a player’s location)

AlignOrientation - Similar to AlignPosition but instead of position it rotates the object towards the dignated orientation
(ex. Spinning a part a full rotation)

VectorForce - Applies a force on the object it’s attached to in the direction it’s set in (ex. Moving an object straight up)

BodyForce and BodyGyro are both deprecated, I wouldn’t recommend using them in new scripts. but BodyForce does the same thing as VectorForce and BodyGyro does the same thing as AlignOrientation.

3 Likes

Thank you. This is very detailed and exactly what I was looking for. Are these the only physic objects in studio?

Along with…

AngularVelocity - Applies a rotational force on the object, similar to VectorForce (ex. Making a tornado spin in place)

those are the basic ones, there are also constraints that you can play around with that work in various ways of connecting 2 parts:

BallSocketConstraint
CylindricalConstraint
HingeConstraint
NoCollisionConstraint
PlaneConstraint
PrismaticConstraint
RigidConstraint
RodConstraint
RopeConstraint
SpringConstraint
TorsionSpringConstraint
UniversalConstraint

3 Likes