#Collision issue

1 messages · Page 1 of 1 (latest)

woeful quarry
#

A thread to stop this issue overrunning the channel

#
if (collisionInfo.collider.CompareTag("Obstacle"))
{
     Debug.Log($"Tag: {collisionInfo.collider.tag}, Name: {collisionInfo.collider.name}, GameObject: {collisionInfo.gameObject}");
}```
spark seal
#

yesha

woeful quarry
#

This was not difficult

spark seal
#

bro

stoic sorrel
spark seal
#

i want it when it hits obstacle only to log that message, not the ground

stoic sorrel
#

and see the results of it

woeful quarry
#

Also, I figured out what the original issue was

spark seal
woeful quarry
spark seal
#

so when it hits the ground then it will log

woeful quarry
spark seal
#

the ;

woeful quarry
#

your if statement is doing nothing

spark seal
#

i removed it

woeful quarry
#

if you just used the above code then you would gain that info

spark seal
#

it worked

#

right

#

all i had to do was remove the semicolon

stoic sorrel
#

then you would know the code always runs, then you would know that the if statement is ignored, then you wouldve seen the ;

spark seal
#

im new so i didnt knw that if statements didnt need ;

woeful quarry
#

Also looking closer your IDE would have been underlining that area, saying you have a mistaken empty statement

spark seal
#

@woeful quarry i have another problem

#

are you here? because i dont want to cross post