Path-Creator icon indicating copy to clipboard operation
Path-Creator copied to clipboard

pathCreator.path.GetPoint(1f) = cannot convert from 'float' to 'int'

Open johnl6234 opened this issue 4 years ago • 1 comments

im trying to use pathCreator.path.GetPoint(1f) to find the end of the path but I get the error Assets\Scripts\Follower.cs(30,59): error CS1503: Argument 1: cannot convert from 'float' to 'int'

johnl6234 avatar Mar 30 '20 13:03 johnl6234

im trying to use pathCreator.path.GetPoint(1f) to find the end of the path but I get the error Assets\Scripts\Follower.cs(30,59): error CS1503: Argument 1: cannot convert from 'float' to 'int'

From what I understand, GetPoint is designed to accept an integer that represents the index of the point you wish to query.

I think you might be looking for GetPointAtTime, which accepts a float value instead and where 1f represents the end of the path.

deliciousfudge avatar Apr 15 '20 08:04 deliciousfudge