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
1
Question by tajhan · Jun 11, 2012 at 06:04 PM · fpsgravity

Personal Gravity and Real Time Gravity Manipulation

I was wondering if Unity is suitable for building a FPS where characters are able to shift their centre of gravity onto other surfaces. Also possibly a weapon that might be able to manipulate this ( either causing zero g or making the target "fall" into the ceiling for example.)

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 Fattie · Jun 11, 2012 at 07:26 PM 0
Share

there's absolutely no problem doing anything like this. Enjoy

avatar image Kryptos · Jun 12, 2012 at 11:02 AM 0
Share

Rochard was made with Unity. And it uses gravity and forces manipulation.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by rutter · Jun 11, 2012 at 07:02 PM

There might be some sticking points, but I think they're more or less the same ones you'd run into anywhere else.

I'd probably start with something like this: turn off the physics engine's built-in gravity, and instead attach a custom component to each player and/or rigidbody in your scene that manipulates kinematics as if each object had its own local gravity.

The component is pretty simple: keep track of which direction is "down" and consistently call `AddForce()` in that direction with ForceMode.Acceleration.

Comment
Add comment · 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
0

Answer by aldonaletto · Jun 12, 2012 at 12:00 PM

There are some problems:
1- You can't use the CharacterController easily, because it assumes that Y is the vertical direction. You can rotate the transform and manipulate the gravity (if you use Move, not SimpleMove), but the CC's capsule collider is always vertical. Maybe a spheric (height == diameter) capsule do the job, if it's acceptable in your case.
2- It's easier when using some rigidbody character - take a look at my answer in the question Walking on the walls - but you may run into the "South Pole Madness", a problem I had and could not solve yet: when the character gets fully upside down, it seems to become crazy, flipping between the desired and opposite directions at some points.

Comment
Add comment · 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

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

7 People are following this question.

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

Related Questions

Transforming a single axis. 1 Answer

Normal Walker: Player Y Rotation Snapping back to 0? 0 Answers

Running into corners causes player to slowly rise 3 Answers

How do you change gravity with a press of a button? Unity 2D 2 Answers

How do you change the direction of gravity? 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