|
hey, I try to make this AI working for quite a while now.. The problem i have with it is, that a the raycast always returns positiv, even if the Object it hits is not my player!! I dont know what I am doing wrong! this is my whole AI... I know that it is not the best jet ;P
(comments are locked)
|
|
Physics.Raycast will raycast against every object within the layers specified by the cullingMask which you leave as kDefaultRaycastLayers, not just against just your player as your question states that you are expecting.
This does what it seems you are trying to do and should actually accomplish it (Note that the Slerp here is not framerate dependent anymore): thanks for ur great help, but i tried ur script, and the only thing that my hunter is doing is forward! he is not looking at my player nor is he running after him! is it a problem with the script or is it me??? so basicly the new script is doing less then my old one... but ur it looks a lot better :P (this is not supposed to say, that i don't appreciate ur help)
Oct 20 '10 at 11:30 AM
Juri
Yeah. Sorry about that. Forgot the transform. before rotation - I'm a little surprised that wasn't an error actually.
Oct 20 '10 at 02:03 PM
skovacs1
where is a transform. missing???
Oct 20 '10 at 02:32 PM
Juri
It was missing. See where it says I edited the post 2 hours ago? That's when I fixed it.
Oct 20 '10 at 04:20 PM
skovacs1
ok so now its doing everything that it should, but it is ignoring everything in its way. when i put a box in its way with a collider on it, the hunter is just going through it. maybe u can tell me a way, so i can send u my project by now i think that there is a problem in a other script! thanks
Oct 22 '10 at 09:18 AM
Juri
(comments are locked)
|
