|
I'am using Arons A* pathfinding. I want a character to move from one point to another. I'am just starting with unity and these are my first scripts. The script doesn't give any errors, but it doesn't work. What is wrong?
(comments are locked)
|
|
currentttarget = 0; <---- You have 3 lower case "T"s here currentTarget = 0; <--- should look like this The answer: Rather than check the remaining distance is <=0, maybe try <=.1 The distance returned is probably not negative, and might never really equal 0, so just check if its close. Tzan thank you for the comment i didn't see that one. problem however still remains. The script doesn;t go to the next target(/waypoint) it doesn't update
Jun 14 '10 at 06:31 AM
Arno
Does it walk to the first waypoint at index [0] if you position the character away from it? var Rate should be var rate, lower case "r"
Jun 14 '10 at 05:09 PM
Tzan
I havent used the pathfinding script so if you are using it wrong I cant help. Rather than check the remaining distance is <=0, maybe try <=.1 The distance returned is probably not negative, and might never really equal 0, so just check if its close.
Jun 14 '10 at 05:16 PM
Tzan
THANKS...it works now. The distance was the problem. Tank you for answering...
Jun 15 '10 at 06:07 AM
Arno
Great! dont forget to mark this question answered. I edited the answer.
Jun 15 '10 at 04:22 PM
Tzan
(comments are locked)
|

Why don't you e-mail Aron?
@Arno, remember to checkmark the Answer, if it helped you, thanks.