I am aware that many have already posted their problems with this command. I have tried all the differen recommendations but I am still unable to get the onTriggerEnter method to work for me.
I am following a set of tutorials and the objective is to create sort of a minigame in which you, using the FirstPersonCharacter controller collect coins.
The FirstPersonCharacter has a RigifBody attached to it, Gravity is applied and it is Kinematic, the "Player" tag is applied to the object.
The coin has a a rotation script (one of the default assets), a mesh collider with the Is Trigger checkbox and the collection script. The "Coin" tag is applied to this game object and it is static.
public class collect : MonoBehaviour
{
private void onTriggerEnter(Collider c0ol)
{
Debug.Log("Registered Trigger");
}
private void onCollisionEnter(Collision col)
{
Debug.Log("Registered Collision");
}
}
I also placed a Debug.Log() in each method to ensure that I get something returned in case a Collision or a Trigger is activated.
I run through the coins and nothing is triggered. I have tried putting a rigid body component into the coin as well, but nothing gets triggered. I am well aware that Static Trigger Collider (Coin) should sent a trigger with a Rigid Body (player) accoding to the table at the bottom of this document.
Is there anything I am missing?
Thank you in advance for your help.