Questions tagged [collider]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
23 views

Position of Gameobject Changes When Hit Play Button

I have a 3D Humanoid model. When I press play button, suddenly position of model changes and collider doesn't match with model.
0
votes
2answers
40 views

Coins are solid objects and I can't collect them

I am just starting out with Unity following along with this video, and I am stuck at roughly 1 hour and 54 minutes in: https://www.youtube.com/watch?v=pwZpJzpE2lQ It is worth noting that the video ...
0
votes
1answer
26 views

RaycastHit2D.point is acting weird when used with circlecast2d

When I make circleCast2d intersects with another circle collider, I get a RaycastHit2D.point that doesn't point at the tip of ...
0
votes
1answer
16 views

Is it possible to prevent the collider 2D outline from hiding in Unity?

Is it possible to prevent the collider 2D outline from hiding in Unity? I am creating some animations in Unity. To create animations I select different parts of a hero and move them frame by frame. ...
0
votes
1answer
30 views

Sphere - AABOX Edge detection

I am trying to implement a particle-AABOX edge collision, the below images represent, two timesteps(dt) where the spherical particle is accelerated by gravity. I have the particle center C and its ...
0
votes
1answer
21 views

Applying velocity to parent that ignores children's mass not working

I am making a VR data visualisation app in Unity and I have a parent with many children (just some primitive cubes) that I can toss around the scene by just setting the parent's rigidbody to the same ...
1
vote
1answer
33 views

Is it possible to somehow change the collider points to match sprites during the animation in Unity?

Is it possible to somehow change the collider points to match sprites during the animation in Unity? I am using the Unity built in animtion recording feature. I would like to change the points of some ...
1
vote
3answers
247 views

How to Make Border of 2D Game in Unity

I have a border by default. But, I'm having trouble detecting if my object collides with the border. I am looking for efficient ways to do this, and I am not sure what should I use. I thought using a <...
0
votes
1answer
92 views

Character falls through the Platform Effector 2D in Unity. How can I fix it?

Character falls through the Platform Effector 2D in Unity. How can I fix it? Here is the demonstration: https://imgur.com/G5YkTxa. I tried changing the Edit - Project Settings... - Physics 2D - ...
1
vote
1answer
55 views

How can I jump down from a platform in Unity?

How can I jump down from a platform in Unity? I use two 2D colliders: one is my character, another one is platform. These colliders allow my character to stand on platform. Now whenever a characters ...
0
votes
0answers
13 views

Circle collider wheels push through polygon collider car chassis

I'm trying to create a simple vehicle and make it run on a terrain (from sprites + PolygonCollider2D). I imported a chassis sprite with ...
0
votes
0answers
21 views

Endless runner character stops moving unexpectedly

I've been trying to make an endless runner game in Unity in which a player moves forward automatically and can move from x to y axis while still moving forward. I do not know how to program so I used ...
0
votes
1answer
195 views

How to align the Polygon Collider 2D in Unity to match the position of Sprite?

How to align the Polygon Collider 2D in Unity to match the position of Sprite? I have a game object. It has a Sprite Renderer with an image. Now I add a Polygon Collider 2D component to the game ...
0
votes
1answer
42 views

Why isn't my tilemap collider appearing?

I am trying to make a 2d game but my player falls through the tilemap every time. My tilemap collider doesn't seem to show up. What is going on and how do I fix this? The first image is rigidbody ...
0
votes
0answers
36 views

Unity: Have raycast penetrate through other colliders/triggers

I have a setup where an enemy prefab has a trigger box that is in front of it: Box and enemy itself is in the Enemy Layer. Now I want to project a raycast to the Player, which is in Player layer. [![...
0
votes
0answers
10 views

Sync Collider size with bones in model

I'm setting at runtime a BoxCollider2D size by taking the difference between the Y position of two bones on the model... but the size I'm getting out of this ...
1
vote
1answer
34 views

Why does my collider behave strangely after a coroutine

So I'm trying to create a simple script that is going to handle the logic for cutting down a tree I'm experiencing some strange behaviour with my script. I have a private field which holds the "...
0
votes
1answer
39 views

How to prevent an object with high velocity from passing through a collider?

Consider a simple 2D platformer. I have a BoxCollider2D on the player object and a TilemapCollider on the ground below(grid). I ...
0
votes
1answer
122 views

Two Colliders on the same GameObject for different purposes

I'm somewhat new to Unity and am trying to build a battle system. Right now, I have an attack that checks collisions with enemy objects like this: ...
0
votes
0answers
61 views

Collider inside another collider: Move the brain via mouse while being able the click the spheres

The spheres have a sphere collider on them and are clickable via this script:Clickable.cs ...
0
votes
1answer
21 views

Collision with supposedly aligned box-colliders

I am quite new to game development, and I am trying to create a top-down game with 2D sprites, but with a 3D feel to it. I managed to do so with the 2D engine by setting ...
0
votes
3answers
408 views

Jittery collisions in Unity 2D

I tried to implement a simple movement to my object. My object moves perfectly fine but I'm having issues with its collision. When I keep on moving object towards the obstacle/ground, collision are ...
-1
votes
1answer
29 views

How would I detect a collision between a rigidbody and a static

I have an object with a rigid body. How would I go around detecting collisions between this object and any other object with a collider on it? I know you can enable/disable collision detection (https:/...
0
votes
0answers
220 views

(Unity) how to write my own raycasting functions

I am making a game in curved space in Unity and I am trying to figure out the best way to handle raycasting. For my purposes the Ray struct doesn't carry enough ...
0
votes
1answer
137 views

Tetris block kinematic rigidbodies pass through one another with Transform.Translate

I am trying to build a Tetris 3D game in Unity but I am stuck at getting the different blocks to interact (to detect each other, to sit one on top of the other rather than going through each other). I ...
0
votes
1answer
179 views

Check if 2 objects with multiple colliders overlap using bounds

I'm writing a script which instantiates buildings in a scene, but in such a way that 2 buildings don't overlap with each other. Every building consists of approx. 10 parts, of which each has a box ...
0
votes
1answer
303 views

OnCollisionEnter2D not working

I am fairly new to Unity2D and am making a 2D platformer to get used to the engine. I am trying to create a platform that moves when the player jumps on it, however, on the script for the platform the ...
1
vote
1answer
149 views

Problems with gravity and box colliders in Unity 3D

I have a game character that can jump or roll in order to avoid obstacles. He is able to roll while on the ground and he can also roll while he is in the air after jumping. Everything was working fine ...
1
vote
1answer
87 views

Why is my player spinning after a collision?

I've made a very simple 2D top down prototype with Unity. This is the code I use for the player: ...
2
votes
1answer
66 views

Making pickup objects with gravity that won't push the player on collision

I am trying to create pickups, that appear after an enemy dies, and that the player can pick up, but I am running into some issues. First of all, I want the pickups to be affected by gravity, so I ...
0
votes
1answer
43 views

Which collider to use on “island” situation?

I have a 2d-top-down-unity game where the player is on an island. The shape of the island is random generated and he is not able to "escape" from the island. So which Collider should I use for ...
0
votes
1answer
54 views

Object floating on “top” of tilemap

I've made a character design and added Rigidbody 2D and Box Collider 2D to it but when I put it on top of the ground which is in ...
0
votes
1answer
49 views

Move an object with other objects connected (via joints) the right way

What is the best way to move an object with other objects connected to it via joints? Let's assume we have the following setup: A player that can move on the x and the z axis "Normally configured" ...
1
vote
0answers
139 views

Instantiated prefabs dont trigger ontriggerEnter while prefabs created not on runtime, do

I am new to unity and trying to make a bouble trouble game. I have enemy prefabs with BoxCollider with is triggered checked. I also have a shooting script. when I am trying to instantiate the enemy ...
0
votes
0answers
19 views

My colliders keep going through one another? [duplicate]

So, I have some platform with colliders and a character with a collider (everything in 2D). The problem is, while there is some noticeable effects (a certain push back) when the colliders collide, ...
1
vote
2answers
780 views

How to flatten the collider for a tilemap?

I am relatively new to game development, and am working on a simple 2D platformer. I have created a tilemap and painted some tiles for the character to walk on.. but he is getting stuck. Yes, I know ...
0
votes
1answer
42 views

How do you allow joints in a character to fall freely based on gravity?

I am building a game in Unity in which a character falls down on death. Is it possible to make the joints fall and bend based on gravity? That is to leave the joints fully dependent on gravity and ...
0
votes
1answer
436 views

How to enable the option “edit physics shape” in the Sprite Editor?

I can successfully import .png files, create tilesets, and use them in my tilemaps in Unity. Thanks to DMGregory, I just learned that there exists an option to ...
0
votes
0answers
20 views

Is there a way to organize colliders? [duplicate]

I am using a tilemap to design levels for my game in Unity. So, naturally, I need some circle/box colliders to interact with the objects in the game. I know that if I use a prefab for every tile, I ...
0
votes
0answers
25 views

Creating valid virtual creature with 3d Boxes

I'm creating this project in unity.Karl Sims, the creator of the project, published the paper describing the project. In order to create the 3d creature like in the video, I'm using 3d boxes and ...
0
votes
1answer
35 views

How do I get the player to collide with another object to use as a boundary?

I'm trying to make a simple game where you move a sphere from left/right and try to avoid falling cubes. If a cube touches the player (sphere), the player dies. I'm trying to set up boundaries using a ...
0
votes
1answer
154 views

Colliders slightly intersecting each other; any solution?

Consider this simple scene: In Unity, colliders slightly intersect each other. Typically, this isn't a problem. However, I want to make a custom character controller using a box collider and not a ...
2
votes
2answers
614 views

Godot: How do I get the id mask for a physics layer by name?

I would like to figure out whether a collider is in a physics layer by the name (string) I set in project settings: ...
0
votes
1answer
42 views

How to use a boolean to activate every item with the same tag?

I've been really stuck on this one and need some help. I've got some accessories for my player, and my goal is to have a collider, with the script attached. When the player walks into the script, the ...
0
votes
1answer
983 views

Unity's Box Collider isn't preventing an object from falling through the floor

I'm working on a little "Tower of Hanoi" AR game in Unity using Vuforia, where the game is projected onto an image target. Now I wanted to make the rings "fall" into place, so I added an invisible ...
0
votes
1answer
117 views

Vertical push doesn't let the object fall down instantly [UNITY]

An object (Wall) is continuously moving forward on the X axis with a simple script: ...
3
votes
3answers
454 views

How do you execute Trigger-collider collision only in one gameobject?

I'm trying to deal with units (generated from the same prefab) dealing damage to each other on collisions. Each Unit has both a Collider2D and a trigger on the front, that deals damage to other units ...
0
votes
1answer
143 views

Unity get reference of GameObject under another GameObject

I am trying to get reference of the object underneath my Player. I don't know if I am aproaching this correctly. Right now, I have a player simply put in the scene, like this: Then I am trying to ...
0
votes
0answers
340 views

How to add Collider to a Line Renderer in unity? [duplicate]

I have created a semicircle using a line renderer, I need to add a collider to this so whenever enemy objects hit this they get destroyed, how do I do this. Current Code ...
1
vote
0answers
59 views

2D Rigidbody with Touchscript movement in Unity won't stay in boundaries

I'm trying to make a pong game where the player has to move both paddles. They are currently set as dynamic 2D Rigidbodies (collision detection continuous) and have a box collider (is NOT trigger) ...