I’m new in unity and my first project is to make a drone, and i was trying to add force at a certain position so that when i rotate the drone and I throttle it will go in that direction. Could somebody please help me.
The method is actually called AddForceAtPosition. (Unity - Scripting API: Rigidbody.AddForceAtPosition)
I’ve seen that but i don’t know how to use it
Read suggested documentation, and copy example.
The page probably explains it better than I can. But normal AddForce pushes the rigidbody’s center of rotation. Kind of like if you were pushing a heavy box, and you pushed the center of one face, it would slide along without rotating. But with AddForceAtPosition, you choose the point in space where you want to apply the force, and Unity will figure out how much torque that will generate. This is similar to pushing a box, but pushing at the top edge of the box. You can image doing that and having the box tip over because you’re applying the force somewhere other than its center of mass.
Ok thankyou for you help