A Websocket signalling server written in the [go] language for WebRTC. For particle/object collision detection in simulations or games, please use [collision-detection] instead.
Questions tagged [collider]
285 questions
-1
votes
1 answer
OnCollisionStay And Coroutine Issue
Hello Everyone I've got a Little problem. I'm trying to make the platformer damage the player as long as the player stand on the platformer every X seconds, now its working but as long as I keep on moving, if the player only stand there nothing is…

Chen Robin
- 25
- 4
-1
votes
1 answer
Only use 1 collider of my gameobject when using OnCollisionEnter2D() Unity 2D
Hello
so i am having a little problem with my ontriggerenter script:
void OnCollisionEnter2D(Collision2D other)
{
if (other.gameObject.tag == "ground")
{
Cground = true;
jumping = false;
…

laurin amiet
- 15
- 4
-1
votes
2 answers
I want to use one int in two scripts and decrease it in the second one
I want to use this int in the two scripts: public int wood;
I want the value of the int to be the same in both scripts.
This is my first script:
public class Tree :
MonoBehaviour { public int wood;
private void…

sadra
- 11
- 2
-1
votes
1 answer
How to check the text found on an object in OnTriggerEnter
I have a question, I created a game where I need to collect a Ballon, and check the number of the text that I attached on it:
Example
public void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "Ballon")
{
…

Tal
- 1
- 2
-1
votes
2 answers
My playable character turns left or right when it meets an obstacle
My playable character turns left or right when it meets an obstacle with a collider. It's normal but I want to know if there is a way to disable it.

Achie1
- 195
- 2
- 13
-1
votes
1 answer
How to detect collisions for a rotating child object in Unity3D C#?
I am making a First Person Shooter and I have a rigged player with a mouse look script, and I used to rotate the spine with spine.transform.rotation, but this method does not look for collisions, this means if I rotate and I am standing near to a…

Je moder
- 83
- 1
- 1
- 11
-1
votes
1 answer
Detecting Collisions in Unity?
I'm making a game in Unity where I want collisions between two moving objects to be detected (One of which is moved by the player using touch. For testing reasons I'm currently writing the script for mouse controls). However for some reason when the…

Maurice Bekambo
- 325
- 6
- 21
-1
votes
1 answer
differentiate between box collider of two different Game Objects in UNITY
I have two GameObjects Body1 and Body2, Both have separate BoxCollider. i want to identify which GameObject (Body1 or Body2) have hit the other.

Muhammad Jazab
- 24
- 2
- 11
-2
votes
2 answers
Cannot apply operator "||" of type "bool" and "Vector2"
im kinda new to programming.I need some help,im making a code where whenever i press on the asset of a specific collider size it gets destroyed,but im having some trouble making that,this is the code that i currently have!!
using…

kaski fx
- 9
-2
votes
1 answer
I can't get my sprites to trigger a collider at all in Unity
I am trying to get one sprite(the player) to trigger a function when colliding with another object that is getting cloned and put into random places within the play field. I have my player collider set to being a regular collider with a rigidbody2D…
-2
votes
2 answers
Collider not registering on prefab
Hello I'm having an issue with my colliders registering. My two prefabs collide with each other and the environment but I am trying to program my game so that when the enemy touches the player, the player loses damage but there is no lowering in…

Alex
- 13
- 4
-2
votes
1 answer
How do i pull the Collider Data out of this sorted array bassed on the object tag and Assign that object to the Target in C#
GameObject GetTarget()
{
GameObject TopTarget=null;
Collider[] col = Physics.OverlapSphere(transform.position, checkRadius, checkLayers);
Array.Sort(col, new DistanceComparer(transform));
foreach (Collider…
-3
votes
2 answers
How to find which side of a collider has been hit
Hi Guyz I could`nt Find a way How to find which side of a collider has been hit........ I have a car and its contain box collider...... And I want is when the other car hit my car then I will add some forces.... but first I need to detect which side…

Mr. Gamer
- 1
- 2
-3
votes
2 answers
Can the player have a heavier weight?
My question is maybe unclear, but I'll explain it through the picture I attached.
So, what I'm asking is, how can I have the player get more affected by the gravitation, so it falls off when only a small part is colliding?
I tried to increase the…

imbruceter
- 29
- 9