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 RenderMan27 · Oct 10, 2012 at 06:42 AM · collidermeshscalefbx

Scaling the Mesh Collider

Hello all,

I have one plane with a png(with transparency) texture on it. Exe: rock. I want to make a mesh collider that fits exactly with the png(rock). Not the plane.

I made the rock collider mesh in 3D Max, export it to FBX, imported to Unity. There in the Project/prefabs i have the mesh(with the import settings) and Box001 witch is the actual collider.

When i select my plane and put a mesh collider, i can select Box001 from the menu, but is too large...i need to scale it(because my plane is also scaled).

Any ideas pls? Pls ask if i didn't make my self clear.

Comment
Add comment · Show 3
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 whydoidoit · Oct 10, 2012 at 06:55 AM 2
Share

If your game is 2D then you should consider 2D toolkit which does this for you.

avatar image RenderMan27 · Oct 10, 2012 at 08:54 AM 0
Share

By 2D toolkit do you mean: http://www.unikronsoftware.com/2dtoolkit/? And without 2D Toolkit? Any ideas?

avatar image AlucardJay · Oct 11, 2012 at 07:08 AM 0
Share

I would suggest use a sphere collider, while not accurate it is much easier to control.

Of course you probably want to use your mesh Box001. So my first suggestion would be to check the import settings of your models, import them at the correct size, then all will be smooth !

Check the Inspector window under Scale Factor (Import settings) : http://docs.unity3d.com/Documentation/Components/class-$$anonymous$$esh.html

4 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by treasgu · Oct 07, 2014 at 03:38 PM

Try to attach the mesh collider to a empty, and scale the empty.

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 Mr Mcbyte · Dec 03, 2013 at 08:19 AM

This might be really too late but you can try this:

 // Given you are building your quad programmatically    
 
 public MeshFilter meshFilter; // Drag the MeshFilter from the game object's inspector.
 public MeshCollider meshCollider; // Drag the game object to get the MeshCollider in the inspector.
     
 void Start()
 {
 
 meshFileter.mesh.vertices = yourCustomVertices; 
 
 gameObject.AddComponent<MeshCollider>();
 gameObject.GetComponent<MeshCollider>().sharedMesh = meshFilter.mesh;
 meshCollider = gameObject.GetComponent<MeshCollider>();
 }
     
 

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 Tordur · Oct 10, 2012 at 11:53 AM

Replace the mesh collider with a box collider then resize the collider to fit the rock. You can also re position the collider to make it fit, if your rock isn't dead center. Hope that helps :)

Comment
Add comment · Show 4 · 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 RenderMan27 · Oct 11, 2012 at 04:48 AM 0
Share

Hello, Yes..off course with a box collider it works. But i need a mesh collider.

  • I have the plane, and i import the special made collider and i can't fit the mesh collider on my image plane...that's the problem.

avatar image Tordur · Oct 11, 2012 at 06:04 AM 0
Share

Why do you have to use a mesh collider?

avatar image RenderMan27 · Oct 12, 2012 at 04:58 PM 1
Share

Yes! I need to use a mesh collider!

avatar image Mackizar · Jun 07, 2014 at 09:03 AM 0
Share

$$anonymous$$aybe he's trying to do one sided collision

avatar image
0

Answer by ahasae · Sep 09, 2013 at 07:39 PM

need help too

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

16 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

Related Questions

Scale collider independent of gameObject. 1 Answer

Can you scale a Mesh independently of it's Collider? 1 Answer

Re: Maya .FBX and Mesh Collider Issue 0 Answers

Why does unity re-scale mesh when using mesh collider? 0 Answers

Mesh Collider from 3d max animation? 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