hey i need a script that has two gameobject one is moving around and the otherone needs the same position put it can not be a child object of the otherone
var otherObject : Transform;
function Update()
{
transform.position = otherObject.position;
}
I’m not 100% sure what exactly it is your looking for but I’ll give this a shot. Lets say Object A is the one you want the object to rotate around, and object B is the one you want to rotate. If you put Object B in an empty GamrObject and set its global position to that of object A. Then you can use this script to change the local position of Object B, to change the radius it rotates at, then simply rotate Object B’s parent object.
I would do this in the LateUpdate if this is a Physics object. The Update happens before the physics. So you will want it to update after the physics to keep it in line.
Aren´t you guys a little bit too nice to him? No real question just something like a command we should provide. Extra bonus for something which is described in the documentation (Joints).
I fully understand the urge to help other people, but there are limits for this, or not?