Guys, it is me again with a new problem!
Today i made my first AI script for my no too handsome enemy “Bobby”; he will help me to learn about AI and other stuff.
Bobby was made using an empy gameObject (with rigidboy and boxcollider attached) which nest the animated body that i made in 3Dmax, and another empy gameObject which has attached a spherecollider (trigger that i use as a field of view):
gameObject + rigidBody boxCollider (father)
— Skinned mesh renderer (Bobby’s body) (son 1)
— gameObject + sphereCollider (it’s a trigger) (son 2)
My problem isn’t the AI script but the behaviour of Bobby when i shoot him.
If i disable son 2 (ameObject + sphereCollider), Bobby falls when i hit him; if son 2 is active, Bobby try to fall but something keep him stand (if i pause the game and deactivate son 2, when i resume the game, Bobby falls).
I try:
- Ignore collider between father and son 2: fails
- I considered the posibility of collision between father and son 2: fails.
The script of my AI script has nothing to do; make Bobby turns to the player when it get closer.
Any ideas? suggestions?
NOTE: son 2 belongs to ignore raycast (because my player uses raycast to aim)
Thanks for read me and decoding me!!!
EDIT:-------------------------
I forgot to tell that boxCollider was put in “father” allowing Bobby to collide; so the box’s dimensions are nearly like the human being.
About sphereCollider, as i mentioned, is a trigger and its radio is about 15 meters (centered at 0,0,0 of his father).