Hopefully some of you remember the code for the AI in the FPS tutorial, I was wondering if that could (somehow) be modified to let the AI shoot at higher objects and lower objects.
All code can be modified to do new things, so yes, that’s entirely possible.
I’m not quite sure how to go about it as I have no experience in AI. However I will try my best to go about it as I just love tinkering with things in Unity
Then try posting clearer questions. You asked if it could be done, not how you ought to go about it…
And FYI, if I had a version of that project on my machine and handy I’d be more helpful and offer ideas, but I don’t so I can’t. Perhaps I’ll d/l it again soon and give it a look but it’s most certainly possible.
Hi Alec, its possible but probably quite tricky. I’ll be watching this thread to see where it goes…Maybe you could post up the code that does the “look at” part?
I vaugely remember Yoggy saying about two years back that you point the gun, then the arm follows the gun, so it might mean re-rigging the character but I really dont know for sure. I did manage to do this last year at school by using the lookAt script on arm and forearm joints but it was a trick getting the orientation right for the joints, and it did mean re-rigging.
Basically using the lookat script is a good starting point though.
Good luck with this
AaronC
OK so lets say I have IK handles on the hands, the hands are parented to the gun and the gun has a look at script. Sure it might look funny but would it work?
cheers Tom