I am making a First Person Shooter and I have a player model(3D), rigged, with animations and a Skinned Mesh Render component on it. I tried the Mesh Collider component, but it has a large negative impact on the game performance (animations, frames per second). So I thought, there must be a way to make your own Raycast System(Script, Variable), but I don't know where to start. Is there a way to look into the RaycastHit component script of Unity or do you guys have any ideas how to start making an own Raycasting Script, which doesn't need collider, but supports the Skinned Mesh Renderer component?
P.S. I need it for shooting at players.
Don't use a mesh collider on a mesh that is dynamically controlled by bones (a rigged mesh). This is just too heavy for most computers. I recommend to use multiple capsule colliders for the limbs and head, and use 1 or 2 box colliders for the chest/stomach. Attach these colliders to the bones so the colliders will move along with the animations. In this way you can use the default raycast system of unity: Physics.Raycast.