Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [meshcollider]

The tag has no usage guidance.

0
votes
1answer
97 views

How to check for mesh overlap?

I'm creating a level editor in Unity. I need to detect when an object is intersecting another as I don't want to allow the user to place an object when it is colliding with something else. In the ...
0
votes
1answer
26 views

How do I determine distance of a point within a ProBuilder mesh?

As in the title, I have an effect prepped for my game which applies certain derived parameters to a post-processing effect after the player enters a boundary I created with ProBuilder. Finding how far ...
2
votes
2answers
103 views

Why does Unity's MeshCollider only use SharedMesh?

For components like MeshRenderer, Unity uses two references to mesh through script--mesh, and sharedMesh. My understanding as of yet that setting a "sharedMesh" will affect every GameObject that uses ...
0
votes
0answers
15 views

Change 3D collider dynamically

I have created one golf course as mentioned here. When the ball is over the hole, I changed the table's collider to mesh collider. When the ball lefts the hole, I set the table's collider to box ...
0
votes
0answers
155 views

Unity Mesh Optimization

I am making a Minecraft style game and I am looking for a good way to hide block faces that are underground or blocked. Thank you for any suggestions. Below is my code. ...
0
votes
1answer
504 views

How can I apply a mesh collider in Unity to an entire imported model rather than a single piece?

I have a series of models from Blender I'm importing to Unity as .blend files and I need mesh colliders applied to each one. What I'm finding is that with any model that is constructed of multiple ...
0
votes
1answer
25 views

Trouble with assigning a model's own mesh to a mesh collider in Unity

I'm trying to use a mesh collider on the player's avatar, rather than the box collider. I've added the mesh collider to the game object (which also has a rigid body) and selected the "convex" ...
4
votes
2answers
439 views

Unity: Create large Terrain with accurate raycast detection?

I'm not using the Unity Terrain because it lacks certain features. Amongst them, you cannot tile them: You cannot create concave walls or make holes in it: No custom textures, no detail textures, ...
3
votes
3answers
8k views

Unity: How is a Mesh Collider “performance expensive”?

Do Mesh Colliders slow down performance simply by existing or only when they are colliding? Do they directly impact FPS or do they slow down the in-game physics?
1
vote
1answer
1k views

Unity - How do I make non-convex Meshes collide with physics?

Whenever I add a Rigidbody component to an object with a non-Convex Mesh, Unity throws this error: Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5. If you ...
0
votes
1answer
180 views

Raycast drawing and hitting limited to inside cylinder

I'm trying to get a very basic "radar" system to work. Right now, I'm not even scanning, just looking at a known target location. ...
1
vote
1answer
1k views

Unity5 using non-convex meshcollider with rigidbody

I want to build a car using wheel collider, mesh collider and rigidbody. The problem is that unity wants the meshcollider to be convex, and that cannot happen because my base model is bigger than 255 ...
0
votes
2answers
394 views

Detecting when a car is out of the track

I am completely new to Unity 3D, just started to follow some tutorials y'day. I am trying to build a 2D car racing game as a part of my learning (time beating, no opponents). I have a racing track as ...
0
votes
1answer
2k views

Can you get polygon collider 2d shape from a sprite?

When you create an object with polygon collider 2d from inspector, unity automatically generates polygon collider that approximately fits the sprite. My question is if there is a way to do that when ...
21
votes
4answers
5k views

Should a wall be created as a plane or as a box?

What are the benefits of a wall being as a plane or as a box? Should I use a plane with a box collider instead of mesh collider?
3
votes
0answers
519 views

Unity & Alternatives to non-convex collider + non-kinematic rigidbody

I am working on a voxel game, where everything is one or more chunks of voxels (16x16x16). As voxels can be destroyed the chunk and collision area changes and can of course become non convex. So to ...
2
votes
3answers
4k views

How to create a boxcollider, which surrounds the gameobject and all of his children?

I have a Car, who needs a Box Collider. If the car would be 1 single mesh, i would only need to call: ...
1
vote
2answers
208 views

Replace PolygonCollider2D with MeshCollider at runtime

I am using a PolygonCollider2D to load in points for a MeshCollider at runtime, but am having issues switching between the two at runtime using good coding practices. This is a simplified version of ...
2
votes
0answers
557 views

Unity raycast misses convex mesh collider

I have a bunch of fighter AIs that are doing attack runs on a target (Currently just a cylinder). It is designed to veer off course the moment it gets too close and loop around for another attack ...
-1
votes
1answer
288 views

How to give a mesh collider gravity 5.0

I was trying to make a simulation of an object that needs gravity to work, a hydraulic movement-assistance system for disabled people. All parts are aligned properly, all objects have mesh colliders ...
1
vote
0answers
67 views

How to create words as objects in Unity?

I am working on a game that has words as obstacles, i.e. the player needs to climb over and around them. There will be hundreds of words in the game therefore I need a way to automate the placement. I ...
0
votes
0answers
117 views

How to prevent object from moving when it's mesh/collider is being updated?

So I a made a script that lets the player grab a vertex, move it, and then update the mesh. To help prevent the player from trying to clip it through other objects I made it so the mesh/collider is ...
1
vote
1answer
1k views

Unity mesh collider detecting collision on object empty inside

I'm trying to get my first 3D game done with Unity. In this game the character will be flying through some rings. I made the ring asset with MagicaVoxel, exported it in .obj and reimported in Unity ...
4
votes
2answers
2k views

How do I fix the bug where my Rigidbody gets stuck on the edge of two Colliders?

The boxes are standing right next to each other, but somehow, the player manages to collide with the ghost edge. I use AddForce to control the player with a Box ...
4
votes
1answer
1k views

Matching collider to character mesh size in different postures

What's the optimal method in Unity to match the size of a Capsule Collider to the actual size of the game object it is part of? To understand what I'm trying to do ...
2
votes
3answers
2k views

Player Flying after colliding - Unity

I have a Player with a capsule collider on him and i have various objects in the scene. Most of the objects have either mesh collider or box collider enabled. When i move my player and the player ...
1
vote
1answer
108 views

Selecting Objects to Prefab Unity

So... I have a tree object and I have duplicated it to have many trees in the scene. So, I have about 200 trees in the scene. Before duplicating I forgot to add a tree as a prefab. Now, is there ...
1
vote
3answers
5k views
2
votes
3answers
369 views

Colliders for moving inside a spaceship when the whole spaceship is made of a single mesh (in Unity)

I've begun to study a unity engine in one purpose: I have a great multi player game idea! The main essence: In space there are two (or even more) huge spaceships with crew consisted of players (all ...
1
vote
1answer
346 views

Unity3d Colliders not working on my characters [closed]

I have create 2 characters in maya and imported them in Unity3d. I am able to move and animate them in unity but the characters are not colliding with each others. I have tried all major colliders ...
0
votes
0answers
221 views

Object doesn't move smooth over edges?

In the last couple of days I'm experimenting a lot with Unity 3D to get a feeling about the environment and the behavior of game development. I come from a programming perspective and try to develop ...
5
votes
1answer
4k views

Space Shooter Unity 5 Collisions not working

After upgrading the official Space Shooter Tutorial to Unity 5, collisions stop working. Additionally, the following error is reported: Non-convex MeshColliders with non-kinematic Rigidbodies are no ...