x


Linking two objects together

Hi,

I have two different objects that I would like to attach together, in such a way that if one moves, the other does as well and vice-versa. Parenting doesn't work, because it doesn't go both ways. I don't want to create an parent empty game object that overlaps the two other objects since it is very important that the user can chose which object he wants to have as a reference to movement.

Thank you very much

more ▼

asked Dec 21, 2011 at 10:10 PM

Bourbeau gravatar image

Bourbeau
1 6 4 6

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

1 answer: sort voted first

Sorry about my previous post, that was a stupid way to do it.

You should make both objects children of a single empty, and always use that for movement. Your comment about wanting to chose which object the user wants a reference to isn't exactly a valid one- the end user doesn't know anything about how it works internally, so all you have to do is make sure that any time they would translate one of the objects, instead translate the parent object. I really don't see why you can't do it this way- it's simple, and guaranteed to work.

more ▼

answered Dec 22, 2011 at 01:25 AM

syclamoth gravatar image

syclamoth
18.5k 20 28 131

(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:

x3758
x111

asked: Dec 21, 2011 at 10:10 PM

Seen: 4047 times

Last Updated: Dec 22, 2011 at 01:25 AM