x


Sticking objects to other objects?

Basically I have a ball connected to two hooks by two separate ropes. These hooks can grab on to objects, this is done by basically saying "if the hook hits an object then stop moving". This works fine for static objects but if it grabs onto moving objects such as cogs then it obviously doesn't move with them. I've tried to solve this by setting the collision object (in this case the cog) to be the parent of the hooks. This works fine because the hooks then move with the object but occasionally an error will happen which breaks the whole game. For a split second the rope connecting the objects goes crazy, I believe it's because the hook is in the process of changing parents. Anyway. Does anyone have any idea how I could do this "sticking"?

more ▼

asked Aug 08 '10 at 01:57 PM

ROM gravatar image

ROM
262 46 49 58

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

1 answer: sort voted first

Physics joints should be better and more stable. Not sure which one to use though, I guess you can start with FixedJoint to see if it works for you.

more ▼

answered Aug 08 '10 at 04:25 PM

Magnus Wolffelt gravatar image

Magnus Wolffelt
457 9 11 26

Thats actually a rather bright idea. I've just been tinkering around with it and because I'm already using joints on the objects it's not working quite as it should. None the less I will investigate further if there are no other solutions. Thanks!

Aug 08 '10 at 06:33 PM ROM
(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:

x1092
x420
x9
x5

asked: Aug 08 '10 at 01:57 PM

Seen: 1125 times

Last Updated: Aug 08 '10 at 01:57 PM