Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In unity I have a rigid body object and would like to apply force to a specific point. For example say I had a cube, I want to hit just the top right corner so it spins as a result. One idea I had considered is spawn a small sphere and fire it at it, then destroy the sphere. But is there a way to just apply the force?

share|improve this question
It's easier for us if you specify the engine in more than just the tag. And what have you tried? – Almo Dec 19 '12 at 21:57
The first words are the engine I'm using, and the ball thing was all I had tried, and for the record throwing a ball of considerable mass (like a cannon ball) at a ragdoll is incridbly fun – ProtoJazz Dec 20 '12 at 2:40
Woops! Somehow I missed the "in unity" part. I just started at "I have a rigid body" for some reason! :) – Almo Dec 20 '12 at 13:20
up vote 3 down vote accepted

void ApplyForce(Rigidbody body) {
    Vector3 direction = body.transform.position - transform.position;
    body.AddForceAtPosition(direction.normalized, transform.position);
share|improve this answer
I suppose that does answer it. I hadn't found that function. Now I just have to figure out how to get the vector 3 of the point I want to apply force to. I'm guessing the fps tutorial is my next step then – ProtoJazz Dec 20 '12 at 2:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.