x


Get/set vector 3 causing problems

I'm working on a golfing mini game and I've encountered a very strange problem. I'm using an empty game object as a golf ball dummy so that the camera can follow the ball smoothly without rotation and jerkiness. (It's also being used for other things such as player placement and such.) I'm using get/ set position to get the position of the actual ball and set the dummy ball to the same vector 3.

Here's the problem: When I add force to the main ball and get/set is enabled on the dummy ball, force is constantly being applied to the main ball! It should only be applied once when striking the ball, then depend on physics to roll to a stop. Instead, it continually rolls along the z axis. (And even gains speed in doing so!) Just to clarify, "Every Frame" is unchecked.

I have been using playmaker to do my scripts, so an example script is not necessary. If you could explain to me in plain english what could be causing this, it would be greatly appreciated!! Otherwise, please let me know if more information is needed. Thank you!!

more ▼

asked Sep 27 '11 at 03:36 PM

Tim.Holman gravatar image

Tim.Holman
136 25 25 27

does one of your objects that you attach to the main ball have a collider? If a (part of a) collider is inside the rigidbody, it might cause a constant force. It happened to me once... :(

Oct 01 '11 at 06:05 PM Martijn Hendriks
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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:

x291
x195
x74
x37

asked: Sep 27 '11 at 03:36 PM

Seen: 710 times

Last Updated: Oct 01 '11 at 06:05 PM