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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by brentshermana · Jan 31, 2015 at 04:33 PM · 2d-physicswaterfield

Specific question about underwater physics (2D)

NOTE: my question pertains to Unity 2D

I am a fairly novice Unity developer, and I was wondering how to go about creating a space in which the 'character' in my platformer would experience a different set of physical laws (in this case, the player would accelerate much more slowly, and be nearly unaffected by gravity). However, I'm more interested in the general concept... for example, what about the opposite? I might also want to create an area where, for example, random forces (wind?) lift my character up, or throw him around?

^^^ all of that is just background. my question is, how do I create a field in which the physical properties of my character are altered??? One in which I can just check on my script "okay, are we in the field or not? If so, I'm going to do this..."

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 meat5000 ♦ · Jan 31, 2015 at 02:16 AM 1
Share

You could try using a trigger (Collider)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Owen-Reynolds · Jan 31, 2015 at 05:29 PM

Why did you write "specific" in the title? This question isn't specific at all!

Just look at general rigidbody settings and movement scripts. You can change game gravity in code. Can change move speed in the movement script. Can change how the player "coasts" in rigidbody settings. Can push a player around using AddForce.

It depends on the exact set-up you have. Just make anything to move the player. Then mess around with settings to make it feel more "underwatery" or "fly-ee." Write them down, and figure out how to switch them as you need to.

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 brentshermana · Feb 07, 2015 at 06:29 AM 0
Share

Thanks for the response Owen. I've edited my question and I hope that makes the information I'm looking for a bit clearer. I know how to make a character, as you put it, "fly-ee" or "underwatery". $$anonymous$$y issue is with the transition, and I can't use a collider as a trigger (because the character must be able to pass through this field, just as it would through water or air.

avatar image Owen-Reynolds · Feb 07, 2015 at 07:02 PM 0
Share

Ahh...read/play with triggers some more. They are known as volumes in other game engines. You can pass through them. The only thing they do is fire OnTrigger* events.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to make 2D water like in Celeste 0 Answers

Pixel Perfect 2D Polygon Collider 2 Answers

Weird physics issue after disabling and re-enabling player gameobject. 3 Answers

SpriteRenderer stops receiving light 0 Answers

2D snow plowing game physics challenge 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