Stack Exchange Network

Stack Exchange network consists of 175 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

Questions tagged [meshcollider]

The tag has no usage guidance.

0
votes
1answer
29 views

Why is my mesh outside its collision component grid?

I've created a blueprint (well, two of them, as a test since the first one wasn't working right) with an sphere component around a mesh, as in the picture: As you can see, the mesh is well placed ...
1
vote
1answer
77 views

Why do my NPC's fall through the world when I select them as triggers?

I'm making a game in Unity where when the player comes into contact with an NPC it will switch scenes. I have the code for it and made sure all NPC's have rigidbody as well as using gravity and convex....
0
votes
1answer
38 views

How can I set my non-convex object's collision to a more detailed one to allow other objects to go underneath?

My problem is simple. I imported a 3D object (it's not convex) and I want the character to go under your legs. But this does not happen: There seems to be a way to do this, I just do not know which ...
0
votes
1answer
41 views

How do i prevent my player from walking through mesh collider

I have a character being moved using rigidbody.moveposition and I have an floating lowpoly island with a mesh collider. When my player walks into a steep slope or a wall, it passes right through. I ...
1
vote
1answer
47 views

Unity SphereCast HitInfo Give me an interpolation of the normal surface?

I'm doing a SphereCast for a GroundCheck of a player. I have my Raycast hitInfo, and here in the picture at the left, I Debug.drawRay in black the direction of the hitInfo.normal every frame It seems ...
0
votes
1answer
37 views

Sometimes can't use the rendered mesh as a collider in Unity?

Most of the times I can use the Mesh Filter's mesh as collider in Mesh Collider But sometimes there is just nothing. No ...
0
votes
1answer
572 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
40 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
120 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
1answer
848 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
37 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" ...
5
votes
2answers
597 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
10k 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
2k 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
236 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
477 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
6k 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
585 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
5k 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
239 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
625 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
338 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
136 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
2k 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 ...
3
votes
3answers
3k 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
111 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
380 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
358 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
236 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 ...