Hi,
Am doing a racing game which has a player and 2-3 AI followers.Am moving the AI towards the player using the default MIneBotAi script.Here it is working fine only for character controller not for rigidbody.
And also am getting the following error please help me out.
Any suggestion is appriciable.
ERROR
NullReferenceException: Object reference not set to an instance of an object
Pathfinding.Path.CalculateStep (Int64 targetTick) (at Assets/AstarPathfindingProject/Pathfinders/Path.cs:431)
AstarPath+c__IteratorD.MoveNext () (at Assets/AstarPathfindingProject/Core/AstarPath.cs:2175)
AstarPath+c__IteratorC.MoveNext () (at Assets/AstarPathfindingProject/Core/AstarPath.cs:2047)
Hi
That is very interesting. I saw you also commented on my website with another, but probably related error. Do you think it is possible for you to get a small reproducible example scene for me so I can debug this issue? My email is aron [dot] granberg [ @ ] gmail [dot] com.
Cheers,
Aron
Hi Aron,
I had sent you that unity scene.
Thanks.
-Chandra
Hi,
The same AI script was working fine with A* free version but not with pro.
Thaks.
Hi
I just checked the example scene you sent me, however it seem to be missing the MyAIPath script. Did you forget to include it?
Assets/Scripts/My A_ scripts/Pathfollower.cs(20,29): error CS0246: The type or namespace name
MyAIPath’ could not be found. Are you missing a using directive or an assembly reference?`
Hi Aron,
I had sent you the script “MyAIPath.cs” which was showing the above error.
Please check your mail.
Thanks.
Hi
I have not received your email. Could you resend it? (yes, I checked in the spam filter as well)
Hi,
Please check your mail.
Hi,
I need some more information about the path.
In that gameplay which i have sent will give me the path.The path may be in straight or curvy nature.So while moving the gameobject how to find whether the path have curve(turn) or not.
Thank you.
-Chandra
Hi Aron,
Please help me out for that error,its very urgent.Because my heigher authority asking me about the project(i have time dead line for this project).I have to deliver the project ASAP.So please let me know the solution ASAP.
Thanks.
Hi
Sorry for the late answer.
I have tested your scene in my development version of 3.2. However I cannot reproduce the bug. I could send you my development version to you if you want since the bug does not seem to be present in that version.
My tests were simply to open the scene you gave me, run it, seeing that the bug did not show up, duplicated the enemyCar a few times and tried again, still no bug.
k . . .then send me that development version so that i will come to know whether it is runnig or not.
Thank so much for your reply.
Sent!
HI,
I need some information i.e in that generated path we will get some curves ,so i want to move the car along the curve by using some physics.So how to findout curves in that generated path.
Hi
There is no way to get info like “go straight for 10 meters, then turn right, continue for 5 meters”, at least not built in. Dot products are a relatively good way to find out how much a segment is turned relative to another segment.
Hi Aron,
Sorry for the delay because i was on holyday. Anyway thanks for send me those files.I have not yet work on that.I will check and let you know ASAP.
Thank you.
Hi Aron,
It is working good with your development version.
Thank you.
Hi,
Here i need some clarification about this project.
Here in my game i have 5 enemies which ll follow the player.
While following the player if the enemies have a distance of 200 from the player then that enemy ll go to inactive state.At the same time i have enemy spawn points in my game.If the player comes near to the spawn points ,an enemy ll be spawn from that point(spawn point position).Here am not instantiate any prefabs instead of that just am activating the inactivated enemy.So here the position of the activated anemy ll changed to spawn point position.From this changed position of enemy the pathfinding is not working instead of that it ll find from last deactivated position of enemy.
So please let me know that am doing any mistake or is there any other solution for this.
Hi
Answered your email. A fix will be included in the next version.