0

Hi I have made a bird model in Blender which looks like this (I have recorded the video on my smartphone) https://youtu.be/9oa-h_EG228 . I was successfully able to import that into Unity .Now I want to add a collider for that.

When I added mesh collider and selected the convex option,it is just way too not accurate.Also I saw in the unity docs that it is not recommended to use as the processing power will increase. I deselected the convex option too but I am not able to get anything

For the terrain which is like a canyon,I made that terrain a rigid body,selected "is Kinematic" and deselected gravity in it. Also I added mesh collider with convex deselected.I tested that against a test object which was a cylinder and I was satisified with the result. I tried the same trick on the bird ,but obviously not selecting "is Kinematic",but it doesn't work. I have modeled these stuff in blender .Is there a simpler way to add a perfect collider for these stuff in unity?

Chethan CV
  • 547
  • 1
  • 7
  • 23

2 Answers2

1

Is it really important for you to have a perfect collider? Most of the time in games you only have approximations for colliders. For a bird you could maybe use one capsule collider for the body and one box collider for each wing.

Also, don't make the terrain a rigidbody. An object does not have to have a rigidbody to be able to collide. A rigidbody is for when you want the object to have physics, like gravity or momentum. You don't want a terrain to have these.

Lyxodius
  • 344
  • 1
  • 5
  • 12
  • I agree. If your **bird** dont need to collide with something small or be precise in collisions, you really don't need a perfect collider. Even many quality games just use 1-3 cylinder collider for this type of things. Unless your game is a AAA quality game, it will only decrease performance for no gain – SeLeCtRa Feb 17 '21 at 23:31
  • @Lyxodius I did I you said. Quite happy after adding two capsule and two box colliders for the bird,but If I dont add a rigid Body to my terrain and only add mesh collider for the terrain,it doesn't give accurate result . How do I work my way around with terrain ? – Chethan CV Feb 18 '21 at 13:44
  • For Unity terrain you need to use a Terrain Collider instead of a Mesh Collider. – Lyxodius Feb 18 '21 at 16:02
0

Like the above answer, it is rarely necessary to use perfect colliders. For example, if you have ever seen colliders in minecraft they are totally off from the model used for graphics. Of course, minecraft is a block game but the concept still applies to more realistic games.

Here is an example of minecraft hitboxes: https://www.minecraft.net/content/dam/games/minecraft/screenshots/crawling-hitbox.png

Poultryghast
  • 58
  • 1
  • 6