• 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 Jack Eaves · Apr 29, 2010 at 01:07 PM · collisioncolliderleveldesign

Collision problems with level design

Hi there,

I have:

A Level: Modelled & Textured in Cinema4D R11 - saved as FBX and placed into Unity. This model has a mesh collider attached with the appropriate mesh.

A Character: For test purposes i'm using the FPS Character prefab that comes with the Standard Assets. I have made sure that the Player Controller is in the right place and the skin is set to 1.

However my problem is that this character can walk straight through parts of the level if hit at the right angle or if heading towards a slope without jumping it will go straight through. I also have fairly large 'tree roots' that lay on the floor accross a path however the character can walk through those also.

Anyone have any tips? would be very handy!

Thanks.

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

1 Reply

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

Answer by spinaljack · Apr 29, 2010 at 03:31 PM

Some things you can try:

Only do movement in FixedUpdate so that it's in step with the physics simulation (not really practical but an option)

Move your character with velocity instead of transform.position as you might end up inside the terrain if you move too fast horizontally into a slope.

Decrease the fixed time interval to make physics calculations more frequently per frame, this will help stop your character from going through things if it's moving too fast.

Use a different collider, either box or capsule as mesh colliders are more prone to getting stuck in things, also it'll be faster. If you're using a mesh collider make sure it's set to convex otherwise it wont collide with other mesh colliders.

Place box colliders in the terrain where clipping is likely, this will act like reinforcement for areas with an odd shape. Typically developers will place invisible walls around areas where the player isn't meant to go, that's perfectly fine so long as it's not too obvious to the player.

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 Jack Eaves · Apr 29, 2010 at 03:45 PM 0
Share

Thank you! I'll give these a shot. I may need to break the mesh down and use box colliders for each object ins$$anonymous$$d of 1 mesh collider for the whole thing, more work but hopefully make it more playable. Also gonna try that invisible wall idea, might help to save some more time for the parts that don't really need to be used.

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

OnCollisionEnter Push Object Problem 0 Answers

Get angle from impact 2 Answers

Can you help me about collision please ? 3 Answers

Very Confused About Convex Mesh Collider Result 0 Answers

OnTriggerEnter Not Working 3 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges