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 MakeITeasy · Jan 14, 2014 at 07:31 PM · physicsmesh collidermaze

Mesh Collider to a character and the maze?

Hi!

I m trying to make a maze game and my main character is a sphere.

I created my maze model on SketchUp and import it to unity. All fine till now.

The image below shows the red sphere in the maze, the maze has a mesh collider. The next image shows the maze with convex (one of the two objects must have a convex so that a collusion must happen between them two):

alt text

alt text

I imported my sphere made up from SketchUp too ( i know i can do it on unity too). I made the maze has Mesh Collider and the sphere a Sphere Collider but they don't seem to be solid at all. My sphere character goes through the walls... (i enabled Is Triger too them both with no results).

How am i suppose to make this work and have my sphere and my maze as solid meshes?

Thank you in advance

maze.jpg (367.1 kB)
maze_convex.jpg (379.6 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
3
Best Answer

Answer by ankush_Kushwaha · Jan 15, 2014 at 11:14 AM

Your IsTrigger must be disabled on both of the object (player and maze), both object must have colliders and one of them should be rigid body. :-)

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 MakeITeasy · Jan 15, 2014 at 12:09 PM 0
Share

when i untick the IsTrigger from the Sphere is looks fine but when i do the same for the maze the sphere falls half in the ground of the maze and looks weird.

Fixed: i ticked on Convex that's why i had that issue with the sphere. But the main problem remains to be the same. the objects are not acting like solid. :(

avatar image
0

Answer by DaveA · Jan 14, 2014 at 07:32 PM

At least one of those needs a RigidBody on it

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 MakeITeasy · Jan 14, 2014 at 08:06 PM 0
Share

I set Rigidbody on the sphere but not working :( am i doing something wrong?

i tried another thing too:

On the start i have a secret cube to control my player for not going over the start edge (see the 1st image, the white cube behind the red sphere). The cube is a child to the maze with the name "Start_collision". The imported game object Player_Sphere has 2 children: the Player Camera & the sphere object. That sphere object child has the Rigidbody and the sphere collider ( Not Is Trigger). Now the Player_Sphere has a js script attached:

function OnCollisionEnter (theCollision: Collision) { if(theCollision.gameObject.name == "Start_collision") Debug.Log("hit the start edge"); }

Unfortunately, it doesn't print any msg on the screen! :(

avatar image
0

Answer by Nick4 · Jan 15, 2014 at 12:30 PM

Since your maze has more than 256 polygons, it can't get a proper mesh collider. You need to create empty game objects and parent them to your maze. Then you can use box colliders on each empty game objects which are binded to your maze. But don't use any of the colliders as isTrigger. isTrigger is only used to detect collisions. Good luck.

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

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

Cant fix my collider problem on an object, help me up :) 1 Answer

Generating a convex hull 3 Answers

Object mesh collider acting strange 0 Answers

2D 360 degress platformer example needed 0 Answers

Raycasting will not hit some imported meshes with mesh colliders? 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