Skip to main content

Questions tagged [collider]

Colliders are geometric proxies used in collision detection. Colliders are usually simple shapes (e.g. spheres, boxes, capsules, and their 2D counterparts) that work best with collision detection algorithms compared to the high-poly 3D meshes they approximate alone or combined.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

How to match Sprite3D's collision poly to its billboard transform?

Assume there is a Sprite3D with a Y- billboard flag on. This sprite3D has a matching CollisionPolygon3D Collision polygon3D is set up to "look" at the camera with a look_at() function, ...
Noideas's user avatar
  • 17
0 votes
1 answer
68 views

Why is my player not colliding with animated obstacles?

I can't figure this out. My obstacles have a basic box collider on them and my player has a rigidbody based controller and collsion detection is set to Continous and when obstacle hits him it just ...
Ivan's user avatar
  • 349
0 votes
0 answers
29 views

Player-Environment Interaction & Collision Handling in Unity

Simply put, how would you go about designing environmental interactions? For example, upon pressing the interact button when near a chair, he can sit on it. (Also works with NPCs functioning with <...
NotLucifer's user avatar
0 votes
1 answer
67 views

How to get around mouse entry signal stopping at first collision?

I have a grid of Area3D objects, and when nothing is around them, they handle the mouse_entered signal exactly as I would expect. The only issue is that I also use Area3D's on other game objects, like ...
Fred Etingen's user avatar
0 votes
2 answers
49 views

two colliders for same trigger are conflicting

I'm trying to detext when player goes inside and exit this house. As the picture shows I need two colliders because the house is not an exact rectangle. So I added two box colliders to an empty ...
anderlaini's user avatar
0 votes
0 answers
28 views

How to implement flexible, deformable shapes?

I'm making a top-down, 2D wargame that simulates large numbers of troops fighting. Instead of taking the Total war approach and modelling each soldier individually, I represent them as 1000-man ...
DeeCeptor's user avatar
  • 255
0 votes
0 answers
157 views

Collision between a sprite and a rect in PyGame

I'm trying to make a simple platformer game, which has code to move the camera towards a player as they jump around. Now I have two classes: one for the player, and one for the platform. In the ...
Divyansh undley's user avatar
2 votes
2 answers
164 views

How to make the player pass through only certain objects, but not others?

Experimenting with my 1st Unity project. It's about a top down swimmer. By toggling the swimmer's collider, he can swim under boats: ...
Tomo's user avatar
  • 133
0 votes
1 answer
219 views

The bottom of the player capsule collider is going into the ground box collider

The bottom part of the player capsule collider is going inside the ground collider. I am using a raycast for detecting whether the plauer is grounded; an object (sphere) that is present on the bottom ...
Sami Rehman's user avatar
0 votes
1 answer
133 views

Wheel Colliders falling through ground

I have read through hours of forums and tried everything, But this issue still persists. I have attached a video showing the issue as well as all of my collider settings. Any help would be appreciated....
son goku's user avatar
1 vote
1 answer
1k views

_ready(): Node not found: "Pivot/Camera" + player falls through the floor

I'm relatively new to Godot 4.0.3. I have two problems which seem to depend on each other so I put both of them into one single question. I know, these issues have been reported multiple times on ...
EarthAndMoon's user avatar
0 votes
0 answers
32 views

PolygonCollider2D components do not work properly in iOS build

I'm trying to figure out why my polygon colliders default to pentagon shapes when I build my app and test it on a device. I have a scene with some blocks you can drag around where the colliders work ...
KD867746's user avatar
0 votes
0 answers
88 views

Physics2D.OverlapBoxAll misses small overlap

I have a tetris-like 2D game with tiles, each made up of a sprite, a Rigidbody2D and a BoxCollider2D. The tiles fall from the ...
ChrisC's user avatar
  • 116
0 votes
1 answer
301 views

How to check if a 2D GameObject is touching something without OnTriggerEnter

I want to avoid using OnTriggerEnter2D because I want to use it in a function like this: ...
Aydiniyom's user avatar
0 votes
1 answer
119 views

Physics.CheckSphere not accounting for changes to object transform

My current project is a turn-based board game in Unity. Here is what I am trying to accomplish and the issue I am having: In Start, I generate the board, then populate the surrounding area with ...
Meuktwo's user avatar
0 votes
1 answer
90 views

How to add visual movement to a car's wheels?

I'm fairly new to Unity and game development in general, I'm trying to build a basic car and give visual movement to the wheels. The car controls are pretty basic: accelerate "w" key, turn ...
Daniel's user avatar
  • 111
0 votes
0 answers
121 views

Box Collider on terrain trees activate far from the actual collider

The trees are prefabs but are placed as terrain trees. There is a space ship that explodes when hits the tree. The moment I got the screenshot is the moment that the ship collides with terrain (the ...
shampoo's user avatar
  • 101
0 votes
1 answer
685 views

Player goes through obstacles with colliders

My Player just goes through stuff he actually shouldnt be able to go trough like enemies or map borders, which all have collider components attached to them. It's really annoying because I haven't ...
Hammynator's user avatar
0 votes
2 answers
1k views

How to deal damage every 2 seconds while enemy is touching the player, rather than every frame?

I have made an up and down movement RPG prototype and I wanted to have a fighting system. I made it so that the enemy follows the player and that I get damage every time he collides with me. The ...
Hammynator's user avatar
0 votes
1 answer
289 views

Should a swinging sword be part of the player sprite, or its own separate sprite?

Should the sword be part of the player sprite and therefore share the same hitbox that is widened when attacking? or Should the attack animation be separate from the player sprite therefore having its ...
WindBreeze's user avatar
15 votes
4 answers
3k views

Solving obtuse interior corner collisions

I'm having some trouble solving collisions in obtuse interior corners. In the above image, the black circle is the initial position, the red is the projected movement (straight into the corner), the ...
IanLarson's user avatar
  • 771
1 vote
2 answers
857 views

Multiple enemies get hit by arrow instead of one

I am working on my first Tower Defense game and I have a problem where multiple enemies get hit by a projectile instead of one. Enemy with its collider: The problem is that when the enemies get close ...
Taras Fityo's user avatar
0 votes
1 answer
1k views

Collider overlap is not being detected

I am writing some logic to handle spawning objects into a game scene at a randomly generated location based on the size of a collider's bounds. The logic for getting the coordinates and instantiating ...
sabo's user avatar
  • 237
0 votes
0 answers
87 views

Alternative to CharacterController

I am really enjoying the use of charactercontroller, but it being limited by a y-axis aligned collider is a real annoying limitation when I am using a 'character' with a very different shape (like a ...
Weckar E.'s user avatar
  • 832
0 votes
0 answers
174 views

Possible to completely deactivate a RigidBody 2D component so that the Composite Collider on a parent object works?

In my Unity game, I have two GameObjects with the tag "Animal": Snake and Tiger, nested like so:. Snake Tiger I have a Composite Collider 2D/RigidBody 2D on both the parent GameObject (...
kanamekun's user avatar
  • 369
0 votes
0 answers
210 views

2D circle and rotated square collision detection and response

I'm creating a 2D multiplayer game in javascript, but I'm actually struggling with a problem (not really a problem, but I don't know how to do). I'm actually trying to make my player (circle hitbox) ...
DarePhoenix's user avatar
0 votes
1 answer
892 views

Why doesn't MeshCollider work in a build?

I have MeshColliders in my scene that are shaped like an hourglass and it works perfectly fine in the editor. However, once I build on XCode and test on my iPhone, ...
fat uality's user avatar
0 votes
1 answer
481 views

Where did the Composite Collider go?

Some of my GameObjects have 2 Sprites nested under them, like how Cat and Snake are nested under Sprites: The "Cat + Snake" parent GameObject has a Composite Collider 2D and a RigidBody 2D ...
kanamekun's user avatar
  • 369
0 votes
0 answers
102 views

How to display the Composite Collider to a player

I have a GameObject with a Composite Collider on it. There are 2 nested GameObjects under it, each with a Sprite: I am making an educational game, and for pedagogical reasons I'd like to display the ...
kanamekun's user avatar
  • 369
0 votes
1 answer
792 views

Possible to have Composite Collider 2D detect colliders in grandchildren?

I have a number of GameObjects with 2 child GameObjects: Sprite Words There is a a BoxCollider2D on both the Sprite child and the Words child. The parent has a Composite Collider 2D on it, which ...
kanamekun's user avatar
  • 369
0 votes
1 answer
647 views

I have a "Floating Capsule Collider" setup, but if Collider stands on the edge of a platform, the player Mesh ends up looking 'stuck'

I have a "Floating Capsule Collider" setup, but it has an issue when the Collider stands on the very edge of a platform-- the player Mesh ends up looking 'stuck' inside of the platform. How ...
yunum's user avatar
  • 69
-1 votes
1 answer
63 views

How to destroy just the specific powerup I hit, not all of them?

Creating a game for a computer science class - basically I have a player (cop) who will collide with donuts. When the player collides with a Donut, I want the speed to increase by 0.5 each time. Here ...
KillerRobot.blend's user avatar
0 votes
1 answer
219 views

Godot KinematicBody2D Invisible After If Statement

The reason I address this question is because of the limited documentation and support for starting devs on Godot. I do not know what is wrong with this one if statement, but after I added it, my ...
Athsmooth's user avatar
0 votes
1 answer
1k views

Why do colliders have a tendency to spin and develop crazy angular velocity in Unity when used as my "player"?

I am trying to create a basic collider for a rigidbody player in Unity 3D. I have been experimenting with numerous shapes but found it hard to get what I want. The primary issue seems to be if the ...
mike's user avatar
  • 481
1 vote
1 answer
670 views

My sprite is hovering slightly above my tilemap in Unity 2D

I have a simple object with a Rigidbody 2D and a Box Collider 2d, that's supposed to fall and land on a tilemap with a static <...
Max Bailey's user avatar
0 votes
0 answers
323 views

My sphere falls through the floor which is made in blender

I am developing a game with a club, and yesterday I requested a floor with a hole and the people from the art team made one for me and gave it to me in a .fbx ...
Susie Xue's user avatar
2 votes
0 answers
1k views

No Collision while rotating. Object rotating with Rigidbody.Rotate passes through other collider

I'm working on a 3D game, and having issues with the colliders. My Cube Controller has movement input by keyboard, with collider and rigidbody components. Cylinder objects have basic colliders and ...
Sheath9's user avatar
  • 21
0 votes
1 answer
316 views

Unity how to make raycaster test only against collider in frustum

I'm working on a scene with thousands of object wich have all a collider associated. I'm just testing if my mouse is on top of any collider in a 2D space. The raycasting operation is taking a lot of ...
Barbapapoy's user avatar
0 votes
1 answer
348 views

My First Person Player Capsule Is Always About 6 inches Under The Floor

Here is the problem. This is the exterior of the hallway in which my player capsule is standing. Notice the bottom of the capsule poking through the floor. This is the interior of the hallway, notice ...
ChristianOConnor's user avatar
1 vote
0 answers
260 views

Unity - How to implement water trigger?

I want my character to change the movement mode to swimming whenever he enters Water. So I used the OnTriggerEnter to check if the other collider is my water volume, and if so, change movement mode to ...
Alexandre Marcati's user avatar
0 votes
1 answer
143 views

BoxCollider2D used as reference to Collide with GameObjects but it uses the original size Sprites size to Collide

I'm a beginner in Unity and pretty much copy and pasted the code but I can't figure out why the game is using the size of the sprite and not my BoxCollider2D as a ...
IRannoxI's user avatar
0 votes
1 answer
45 views

How to make trigger function respond to certain collider pairs and not others?

I assigned two colliders to one GameObject. Both are different sizes. I am doing operations with Trigger messages. I want this Trigger function to work for only colliders 1 and 3, but not collider 2.
gunza's user avatar
  • 13
0 votes
3 answers
1k views

Why am I getting Null Reference Exception inspite of checking if the Object is not null to execute something

Hi I am just trying to convert a simple flappy bird game into multiplayer game. So In the multiplayer game using Photon , I want the bird to collide with the ground or pipe but not with the enemy bird ...
Chethan Venkataramaiah's user avatar
0 votes
0 answers
47 views

How to change fall delay of a gameobject by time?

I want my gameobjects to fall faster by time as the player collides with them. What I mean is, when the game starts, the gameobjects fall off after 1 second the player collided with them, but after 60 ...
imbruceter's user avatar
0 votes
0 answers
27 views

What are the tradeoffs I should consider when choosing how to track whether a GameObject is out of bounds? (Unity 3D)

The obvious ways are to either: OnTriggerExit for a box collider which wraps the stage bounds OnTriggerEnter for 6 flat box colliders surrounding the stage I suppose, to start, 6 flat boundaries ...
pixelpax's user avatar
  • 143
1 vote
1 answer
6k views

Why is OnTriggerEnter not called when my objects do not have Rigidbodies?

I am trying to get my enemy to take damage, however it is not working. I know the reason: the box colliders on not triggering the OnTriggerEnter message. I do not ...
Arya Akhavein's user avatar
0 votes
1 answer
292 views

Why does OnTriggerEnter2D/OnCollisionEnter2D work when there is no other collider object opposite?

my bullet: There is a Box collider (checked "is Trigger") It has Rigidbody2D (Gravity = 0, freeze rotation Z) https://i.sstatic.net/ik1IY.jpg I added the "OnTriggerEnter2D" ...
gunza's user avatar
  • 13
2 votes
1 answer
67 views

Collision objects aren't preventing falling in Unity

This is a super basic question, but I have absolutelly no clue why there is no collision and the player continues to fall. Im following FreeCodeCamp(minute 37:20). This is what I have: What is ...
Roman's user avatar
  • 135
2 votes
1 answer
5k views

Show colliders in a build game in Unity

Is there a way to show all colliders 2D in a a released game at once? I am making a 2D game in Unity and have to show all colliders to the player. Can I use Gizmos?
Ayur Games's user avatar
0 votes
1 answer
83 views

how to add overall collider to a bunch of circles or boxes?

I have 3 circles (2D) they all have circleCollider2D. what I want is to make a collider that make border around them. I can't express which type of collider I need, so I put example image below. Red ...
Rashad Nasirli's user avatar