- Home /
Apply force to a rigidbody based on the rotation of a child object.
I will use a ship / motor analogy to help explain what I'm talking about.
I have a ship with a rigidbody component and a motor (no rigidbody). The motor is a child of the ship and will be positioned somewhere on the exterior of the ship (determined on scene load). I want the motor to apply a constant force on the ship based on the motor's position and rotation. Physics should operate in a believable way (i.e. the ship should experience torque if the motor is offset from it's center of gravity). Multiple motors need to be able to operate simultaneously.
I tried messing around with Rigidbody.AddForceAtPosition(), but can't seem to get the correct results. Hopefully you can give me some advice. Even if you have no experience with this sort of thing, just spitball an answer and it might turn out to be useful. Thanks in advance.
Your answer
Follow this Question
Related Questions
Child colliders affecting parent rigidbody characteristics? 0 Answers
OnTriggerEnter triggers twice when changing the parent of a gameObject inside of a collider. 1 Answer
Child Gameobjects are not fixed to the parent when using physics 0 Answers
Parenting the Character Controller to rigidbody: won't stick 1 Answer
Child rigidbody clipping through walls. 2 Answers