- Home /
Interaction around an gameObject
Hi everyone !
Here is the thing.I have an empty gameObject and an object (a sphere). I would like to move into my 3D world and make my sphere move around my gameObject (we can't see this game object). If I go in a direction (e.g right) I would like my sphere doesn't follow immediately my gameObject but create a smoothly effect to join it. Do you have an idea how to make that in JS or C# ?
Thanks a lot for your help :)
Answer by fherbst · Jan 29, 2011 at 02:30 PM
There is a SmoothFollow script in the Standard Assets. You can look at that and adapt it to your needs, if necessary.
Could be like this: Sphere orbits GameObject1, which in turn SmoothFollows GameObject2, which you control with your keyboard (or whatever).
Yes I was thinking exactly the same. Some random orbits around GameObject1 and then my sphere is following a GameObject2 (whith some limit of height and width). Is it hard to implement?
I don't think the objects should be parented to each other. If you move dummy1 while dummy2 is its child, the SmoothFollow script would be senseless... because dummy2 would stick with dummy1 anyway.
Your answer
Follow this Question
Related Questions
Enemy circles player instead of attacking. 1 Answer
Moving Player Up and Down in 2D 1 Answer
A node in a childnode? 1 Answer
exspecting EOF, found '}'. 3 Answers
Question Concerning transform.Rotate 1 Answer