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 Entyro · Jan 17, 2013 at 04:34 PM · collisioncolliderwaterisland

Island collider

Hi! I was just wondering how can you create a collider around an island so you can't go into the water? For example a collider around the island on the picture.

alt text

pic.png (342.5 kB)
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

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by doublethink · Jan 17, 2013 at 10:55 PM

Most games I've seen use box colliders to keep physics calculations simple. Usually a lot of boxes placed somewhat-accurately around the playable area to create 'invisible walls' with no where for the player to escape. I know the Unity Bootcamp demo uses this technique in the starting area.

See http://u3d.as/content/unity-technologies/bootcamp/28W

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
1

Answer by danilonishimura · Jan 17, 2013 at 10:18 PM

@RiseX, there is some ways to do it:

  • Model the collider in a 3D modelling software and import the mesh into Unity.

  • Create several transparent boxes around the island.

  • If your whole scene is this round island, you can define a maximun Distance from the center and while your character moves, check if the next position is smaller than the distance you defined.

The round collider is not a solution that I personally like, but you're the one to decide.

Comment
Add comment · Show 5 · 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 Entyro · Jan 17, 2013 at 10:40 PM 0
Share

Thanks for your help, really appreciate it!

avatar image danilonishimura · Jan 18, 2013 at 01:28 AM 0
Share

As @deoublethink pointed out, the best way (and the way I'd recommend) is to use the BoxCollider approach.

avatar image Entyro · Jan 18, 2013 at 05:50 AM 0
Share

Ok thanks. But if I use a box colliders shouldn't it take like several hundred of these to fill the whole island. I actually thought the mesh collider around a model was the best idea but I could be wrong.

avatar image doublethink · Jan 18, 2013 at 06:14 AM 0
Share

Unity can handle thousands of box colliders with ease. Even so, try to make them as big as you can. Collisions with custom mesh colliders of any size take more cpu power to process than standard boxes.

avatar image Entyro · Jan 18, 2013 at 01:21 PM 0
Share

ok thanks, I will try that

avatar image
0

Answer by jmgek · Jan 18, 2013 at 01:30 AM

I would put a simple plane colider at the same position as the water then when they enter into the water just kill the char. this will leave alot of free resources for you.

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

12 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

Related Questions

Vehicle collision with terrain 1 Answer

Object Collision PLEASE HELP!!! 1 Answer

Player shaking when colliding with objects 3 Answers

Collider going through walls with box collider.. 1 Answer

Overlap point of 2 kinematic colliders 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