Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Peter 10 · Jan 29, 2011 at 01:37 PM · javascriptmovementgameobject

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

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

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).

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Peter 10 · Jan 29, 2011 at 02:47 PM 0
Share

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?

avatar image Peter 10 · Jan 30, 2011 at 04:57 PM 0
Share

Is it the good hierarchy ? :) http://grab.by/8FzL

avatar image fherbst · Jan 30, 2011 at 09:18 PM 0
Share

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

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

No one has followed this question yet.

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges