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 jc_lvngstn 1 · May 27, 2010 at 01:21 AM · physicsrigidbodychildrenspaceship

How should I structure an object with a mix of rigidbody and non rigidbody children?

I have a spaceship.

Empty Gameobject attached

Turret Mount attached - this can turn from side to side. It's a rigidbody, with a fixed joint.

 Turret body attached - rigidbody, on a hinge join, only allowing side to side rotation

     Turret Head attached - rigidbody on a hinge joint, only allowing up/down rotation

This worked fine before. But, reading through some posts, it seems to be better to use physics for movement control of the spaceship, so I made the spaceship a rigidbody, and made the empty gameobject a rigidbody, with a fixed joint attached tothe spaceship. Turret mount is attached to the empty gameobject.

This doesn't appear to work well. Everything but my spaceship has .01 mass, no drag, no angular drag. And yet, I guess because the turret is on top of my ship, the ship slowly rotates up.

Honestly, I felt more comfortable handling spaceship control when it wasn't a rigidbody, but I wasn't able to make it bank properly. I just want very simple spaceship "pizza box" control.

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
0
Best Answer

Answer by Orion 1 · May 27, 2010 at 07:58 AM

I think you have to make a decision here

  • either have the spaceship be rigidbody, and the attachments be non-rigidbodies (don't use joints, but just the hierarchy and rotate them via a simple script if need be)

  • or your attachments rigidbody and attached via joints (although right now I don't see the point in it, tbh)

Your movement glitches probably come through the different rigidbodies interacting. Generally using joints for something like this doesn't quite give the desired outcome.

Concerning your spaceship's movement, you'll have to decide if you want "real-space-like-realistic-inertia-based-movement" (kinda like asteroids) or "the-spaceships-are-actually-like-aircrafts-but-in-space" (like in star wars). I don't quite get which one you're looking for.

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 jc_lvngstn 1 · May 27, 2010 at 06:31 PM 0
Share

Honestly, I would be tickled pink to get rid of the joints on my turrets, but I had a real hard time restricting their rotations to certain axis, and certain degrees without using the hinge joints. But, I think I will revisit this. It seems to me that physics is one of those things that seems to solve a problem at first, but can easily become an even greater evil :)

avatar image Orion 1 · Jun 01, 2010 at 07:52 AM 0
Share

It certainly does, especially when you start caring about performance physics will be back to haunt you.

What sort of angles do you need your turrets to be?

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

Composite body physics 2 Answers

Character Controller children of a car: Inertia effect, delay effect, what??? 1 Answer

Does setting the rotation of an object override the physics engine? 1 Answer

Stop rigidbody A from applying physics to rigidbody B while still allowing collisions between the 2 objects 0 Answers

Rigidbody should ignore child collider 3 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