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 BritishGuy · Jan 25, 2015 at 01:21 PM · rotationgravityspacespaceshipartificial

Artificial Gravity "SpaceShip"

Hello.

What would be the best way to go about adding artificial gravity to a moving spaceship that is rotating around all axis.

at the moment i have disabled the world gravity, parented my character to the ship and applying a down force to keep me grounded and upright, But it is not without its problems like walking on interior walls and such "not intended"

Would it be best to just apply the worlds Physics.gravity to the rotation of the spaceship and use a rigidbody character controller? if so, how could i achieve this effect? "ship rotation = gravity rotation" Thanks.

If anyone has any better ideas or suggestions i would greatly appreciate it, thanks.

Comment
Add comment · Show 2
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 BritishGuy · Jan 25, 2015 at 02:16 PM 0
Share

ok i managed to get gravity to rotate with my ship so i stick to the ground, 1 problem though, my characters rigidbody pulling down on the spaceships 0 gravity rigidbody i am pulling the ship down with my gravitational force, So i need to reside to an alternative method of doing this, Any ideas would be greatly appreciated, thanks.

avatar image Glurth · Jan 25, 2015 at 05:13 PM 0
Share

Every action has an equal and opposite reaction.

You will need to apply an equal force in the opposite direction for the ship to stay in place. How to do this.. hmm. AddForce(), in the opposite direction of gravity obviously, but how do we know how much force? Perhaps; Physics.gravity* (-1*player.rigidbody.mass)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by wibble82 · Jan 25, 2015 at 10:43 PM

have you considered keeping the ship static, and simply rotating the camera / scenery to give the illusion of motion. I don't know anything about your game so don't know how appropriate that'd be, but it's a common trick to get this type of effect - less worrying about the direction of gravity and the effect of lots of dynamic bodies bouncing around.

Comment
Add comment · Show 1 · 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 BritishGuy · Jan 25, 2015 at 11:47 PM 0
Share

Not sure how i would achieve that to be honest, I was told to make a copy of main ship off scene static with my character controller on there while the camera was on the moving ship, The problem is i am using a Floating Origin so every so many units everything gets shifted back when the ship resets to 0,0,0

$$anonymous$$y project so far is beautiful, A full scale solar system for exploration in a Cruise / Light / Hyper-speed ship, So far the engine has kept up with the 1,000,000,000,000 m/s velocity, runs very smooth too, just a few hitches here and there such as this character controller and gravity issue.

I have attempted the "cloned static ship" approach but i just cant get to grips with it, It baffles me as to how i would keep a camera on a moving ship while the rigidbody character is sitting in a fake ship, Could you maybe shine some light? Thanks.

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

21 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

Related Questions

Constant 3D rotation (torque, angular acceleration, etc) GLOBAL to object in space? 1 Answer

G Force Acceleration 0 Answers

Drift Rotation 1 Answer

Space ship controls locking into place 1 Answer

How to add rotation force with playmaker? 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