generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Did yesterdays update do anything to PathFinding?

Previous Thread :: Next Thread 
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 10:37 AM
So before yesterday this line was working. Today it's not triggering therefor meaning that the path is less than 2. I'm confused :/

Path = game:GetService("PathfindingService"):ComputeRawPathAsync(script.Parent.Engine.Position, game.Workspace.Car.Union.Position, 512)
Path2 = Path:GetPointCoordinates()
if #Path2 > 2 then
print"yup"
else
print"nah"
end
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 10:42 AM
Apparently the contains 0 cords. O.k..
Seriously, can I go 1 day where I don't have to backtrack through my game fixing something that roblox has brung upon itself.

Yesterday I spent the whole day attempting to fix my game because body objects run at 30FPS less than server and now today I'm going to trying to fix some shoddy pathfinding update.
I'm on my last leg. Rant over.
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 10:58 AM
Certain positions it will happily find a path, but then if i move it slightly sometimes it won't find a path at all. Although clearly there's nothing blocking its path -_-
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 11:05 AM
Never mind, the Union must of been effecting it somehow..
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 11:13 AM
Nope it's broke again. Seriously what's happened.
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
15 Aug 2014 11:36 AM
*Facepalm*

~Swagilitious and not Nutricious~
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 11:43 AM
I don't see any reason for you to be face palming over me. There's no reason for it to be working perfectly one day and then not on the other because it's not creating any path.
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
15 Aug 2014 11:43 AM
No, at first glance everything looks the same do far.

One thing, u r not handling any errors which Path throws at you (in which case yes the path will be empty).

So here is an error handler, but u will have to come-up with your own, 'cause this one is for a Humanoid:


function ReturnPath(start, finish, MaxDist)

local path = pathfinding:ComputeRawPathAsync(start, finish, MaxDist)
print (path.Status)

if path.Status == Enum.PathStatus.FailFinishNotEmpty then
local dist = (finish - start).magnitude
while dist > 8 and path.Status == Enum.PathStatus.FailFinishNotEmpty do
wait()
finish = start + (finish - start)/1.5
path = pathfinding:ComputeRawPathAsync(start, finish, MaxDist)
dist = (finish - start).magnitude

end -- room to manuveur?
Bot.ShowPath (start, finish)
end -- finish error

if path.Status == Enum.PathStatus.FailStartNotEmpty
or path.Status == Enum.PathStatus.ClosestNoPath then
wait()
start = start + Vector3.new(0,0,4)
path = pathfinding:ComputeRawPathAsync(start, finish, MaxDist)

if path.Status == Enum.PathStatus.FailStartNotEmpty
or path.Status == Enum.PathStatus.ClosestNoPath then
start = start + Vector3.new(4,0,-4)
path = pathfinding:ComputeRawPathAsync(start, finish, MaxDist)
end
if path.Status == Enum.PathStatus.FailStartNotEmpty
or path.Status == Enum.PathStatus.ClosestNoPath then
start = start + Vector3.new(-4,0,-4)
path = pathfinding:ComputeRawPathAsync(start, finish, MaxDist)
end

if path.Status == Enum.PathStatus.FailStartNotEmpty
or path.Status == Enum.PathStatus.ClosestNoPath then
start = start + Vector3.new(-4,0,-4)
path = pathfinding:ComputeRawPathAsync(start, finish, MaxDist)
end

Hum:MoveTo(start)
wait()

end -- start error?
print("Returned: ", path.Status)
return path
end--Return Path


Also, while developing u should be drawing-out these paths so u can see them, and printing errors, so that u can see what your code is doing....

GL
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 11:49 AM
I don't seem to be explaining this very well sorry.

I have 2 cars. 1 car is following the other using pathfinding. They are out in the open, there's no bricks in between them. Sometimes the service will return the path length like 20 for example and sometimes it will return the path length as being 0 even when there is considerable distance between the 2 vehicles and nothing but an empty baseplate.

It was not doing this 2 days ago. I've gone back to an old save from 2 days ago and it isn't working. Nothing has changed.
Report Abuse
Vescatur is not online. Vescatur
Joined: 18 Feb 2012
Total Posts: 3426
15 Aug 2014 11:52 AM
I've heard from multiple people that ROBLOX broke/changed the pathfinding service.

Not sure how to fix it, or when ROBLOX will fix it, just stating what I've heard.
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 11:54 AM
Have you heard this recently as in today and yesterday?
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
15 Aug 2014 12:00 PM
I still don't see it....

I have been running:

http://www.roblox.com/Hike-Ball-place?id=151852987

(just an AI running thru a maze)

for the last 15 minutes. Hasn't hung yet...
Report Abuse
Vescatur is not online. Vescatur
Joined: 18 Feb 2012
Total Posts: 3426
15 Aug 2014 12:06 PM
Recently as in today and yesterday.

My pathfinding still works though.
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 12:06 PM
Could you take a look here. It's arrow keys to control

http://www.roblox.com/Project-Testing-place?id=171852087

The NPC car stops when it can't find a path and starts when it can find one.

It will find a path then have about 20 failed attempts at finding a path then find one again. It's very weird and like I said it was working perfectly fine.

Brb out for 20 mins.
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
15 Aug 2014 12:08 PM
*Side Note:

A better way to have one car follow another is to have the first car drop a "BreadCrumb" into a table and also update the previouse BreadCrumb with its current position, every 1/2 second or so.

Second car just follows the dots...


Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 12:52 PM
But unless the NPC starts behind the other car it has to find the first breadcrumb.
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 02:07 PM
If I make the part touch another part then for some reason the pathfinding service doesn't create a path.
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
15 Aug 2014 02:29 PM
It doesn't want to Path to a Union object.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image