x


gameobject with less weight

hi... I made 2 balls ... and I wrote adding force in X direction... everything work good but the objects seems to heavy... when the ball hit the other they don't move fast like for example pool ball , but they are heavy like iron balls... I just set their mass to " 0.0000000001 " but it still heavy... is there any way to make it more realistic like soccer , pool or golf ball?

more ▼

asked Sep 21 '11 at 09:45 PM

MobinS gravatar image

MobinS
56 23 32 36

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Your problem is most likely either related to Scale or related to your ForceMode Parameter.

Scale:

If your physics objects seem to move really slowly at all times, then it might just be because your objects are too big. Try shrinking your objects:

A soccer ball should have a diameter of around 0.12 units; For pool try 0.05 diameter; For Golf try 0.04 or less

ForceMode:

If you are using Rigidbody.AddForce to move your game pieces around, be careful what ForceMode you use. Example:

function Start() {
    //ForceMode.Force [default!] will multiply by Time.deltaTime;
    //     Intended use is to apply Force OVER SEVERAL FRAMES
    rigidbody.AddForce(Vector3.forward);

    //ForceMode.Impulse adds all the force in one burst; useful for kicking
    rigidbody.AddForce(Vector3.forward * 10, ForceMode.Impulse);

    //ForceMode.Acceleration will acts exactly like gravity does
    //    This is the same as multiplying by rigidbody.mass
    rigidbody.AddForce(Vector3.up * -9.8, ForceMode.Acceleration);

    //ForceMode.VelocityChange will simply add the input to rigidbody.velocity
    //    This is the same as using Impulse and multiplying by rigidbody.mass
    rigidbody.AddForce(Vector3.forward, ForceMode.VelocityChange);
}
more ▼

answered Sep 21 '11 at 11:14 PM

SilverTabby gravatar image

SilverTabby
1.9k 3 6 18

thnx.......

Sep 22 '11 at 12:21 PM MobinS
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x169
x27

asked: Sep 21 '11 at 09:45 PM

Seen: 640 times

Last Updated: Sep 22 '11 at 12:21 PM