i cant collide with the new instantiate object ( clone )

Hello all,

i have a problem when i try to use instantiate to create a new clone object, when i create the new object with :

Instantiate (comida, posicion_comida, Quaternion.identity);

i can create but i cant collide with this new object, ¿ Why ?, i know if you clone a new object the have the same propeties of the original object

help me please

pd : proyect in unity2D

that should work its not about instantiating ;

u said the object has the same properties so i think your problem is this :

check that the object has collider and “IsTrigger” is checked on collider component and has a RigidBody2D ?

in collision detection on of the objects should have these ;

Hey @zamoraxam,
I can only ask given the infos you gave, did you correctly build the prefab?
Does it includes a 2D collider?
Do you have some sort of collision detection function in “comida” (OnTriggerEnter2D or OnCollision2D)?

Have you correctly referenced “comida” in the script where you instantiate it?
I cannot do more if with the info and without a visual on your code

[Solution] The instruction are right , the problem was when i instantiate a new object , the new object has the default name “yournameObject(Clone)” , and when you try to do something whit that new object you cannt collide with him because the new name are no “yournameObject” is “yournameObject(Clone)”,the solution what i do is rename the new instantiate object using this instruction :
mynewObjectClone.name = “namewathyouwant”
and this new name object you add in the raycast function, and now you can collide with him

the instruction “instantiate” was all time correct, the problem are when you create a new object the new object dont have the same name

in all case thanks all for read and comment this problem <3