This seems like a simple thing, but I am having a lot of trouble trying to find an answer in search. I just want to know what determines where a game object origin is (the transform position) and what sort of a typical convention would be for what I am trying to do (cast rays).
Use case: I create a 3D model in Blender and import it into Unity. For example, say a player or NPC character model. I add a Character Controller which has a Collider. I adjust the Collider to fit the model. I then want to do a RayCast from the model for some reason. When I do this, for convenience, I use the gameObject.transform.position. But that position is at the bottom of the model, and thus near the bottom of the collider. But when I’m raycasting, I will often want to do it from near the middle of the collider on the y axis (3D).
This creates a few questions.
If I want to ray cast from the center of the collider, I could just always adjust the start point for the ray cast. But is that proper convention? It doesn’t feel like it.
Is the game object origin in the wrong place? In other words, is this a symptom that my Blender model is not right?
Thanks for any insights.