How can i fix the distance of 2 GameObjects in 3d ?
I want to move the second object with mousse, but always with the same distance from the first object.
How can i fix the distance of 2 GameObjects in 3d ?
I want to move the second object with mousse, but always with the same distance from the first object.
Afisicos,
If you are moving the objects with forces applied to a rigidbody I would suggest checking out the usage of joints:
http://unity3d.com/support/documentation/Manual/Physics.html
If you are simply applying a translation to the objects based on mouse movement with no physics, then you have a lot more options. The easiest way to do it would be to mount one game object onto the other so that when the parent object was moved then other one would follow. If you need to be able to move either object and have the other follow you could write a simple script that initializes with the distance between objects and updates the object positions if one moves.
oh, Ok , sorry I made a noob question xD. Now I see it too easy.
I have hide the proyect but now i say how is it:
I have an idea for a spaceship control, using only a ray from camera to a plane in a fix distance (my old question) with his normal vector pointing to me ( the spaceship ) , and using the function LookRotation for change the direction of my spaceship, to the ray hit in the plane every frame.
I think that is a posible good control but i dont know if i can programm it.
Thanks for the help