system
1
Hi All,
I have imported a 3D character model as an enemy within an FPS game, I have tried to assign a collider to the model to prevent it from passing through objects, however, when I run the game the enemy model still passes through objects, and it does not seem to have any collision detection at all, especially when attacking the enemy.
Would anyone have any suggestions on what could cause the issue, or how to fix it?
Any help would be greatly appreciated.
D
Collision detection requires a non-kinematic rigidbody on at least one side of the collision, as well as just a collider. Do you have a rigidbody on your character? Another thing to remember is that if you use mesh colliders, they don't collide with other mesh colliders unless they have 'convex' set to true- for the purposes, terrain colliders count as meshes.
system
3
Thanks for the info, checked the mesh collider settings and switched on the convex setting, it seems to have sorted the problem, so now the enemy model does not pass through the object, and now follows the logic and move around the object towards the target.
Thanks again. D