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 Major · Aug 17, 2014 at 02:18 AM · gameobjecttransformobjectmerge

Merging Object

I am trying to simple merge 2 spheres together so that they act as 1 rigid body instead of 2. Like they are welded and so that 1 appears indented into the other. All of this happening during runtime. What I am doing is trying to make a POC for solar system simulation in Unity3d. I have the gravity worked out, just not how to merge objects like I said above. I haven't really ever tried anything like this and have no idea where to start. Any help or pointers in the right direction will be appreciated thanks!

Comment
Add comment · Show 1
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 roboaedin · Aug 17, 2014 at 03:00 AM 0
Share

A workaround for this may be to merge spheres in a program like $$anonymous$$aya or Blender, and export it/import it to Unity, then add a Rigidbody... pretty complicated workaround...

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Joxno · Aug 17, 2014 at 02:22 AM

You can go about this a couple of ways:

1: Create an empty gameobject, create 2 spheres, move the spheres into the positions that you'd like, and then drag and attach them to the emprty gameobject, and then attach a Rigidbody component to the gameobject.

2: Create 2 spheres, move them into position, drag and attach 1 of the spheres onto the other. Which should have the same effect as the 1st solution.

Comment
Add comment · Show 2 · 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 Major · Aug 17, 2014 at 02:38 AM 0
Share

Oops. I meant during runtime. I have edited the question.

avatar image Joxno · Aug 17, 2014 at 04:46 PM 0
Share

Well the concept is pretty much the same except that you'd do it in code.

 var s1 = new gameObject("Sphere1");
 var s2 = new gameObject("Sphere2");
 ..
 $$anonymous$$ove s1 & s2 into positions
 ..
 var go = new gameObject("Body");
 s1.transform.parent = go.transform;
 s2.transform.parent = go.transform;
 go.AddComponent("Rigidbody");

This isn't the full code but I think you get the jist of it

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

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

destroying game object in a specific transform 2 Answers

how to merge object same as Parent Child ? 1 Answer

Can't Return the Tag of a Child Object 4 Answers

Setting Without Altering Object Scale and Collider Scale 0 Answers

How to add Mesh Collider ? 2 Answers


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