Skip to content

Commit db872ff

Browse files
committed
bug fix
was checking if there was a valid platform at the point before user teleports. broke small/fast platform links breaking by not checking at new player position.
1 parent d50aaf6 commit db872ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Scripts/PlatformLink.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void LateUpdate()
113113
if (!linkLock)
114114
{
115115
//Check if there is a valid platfrom and link/unlink from results.
116-
if (PlatformCheck(avatarRoot.position, out RaycastHit hitinfo))
116+
if (PlatformCheck((linkedObject == null) ? avatarRoot.position : lastWorldPos, out RaycastHit hitinfo))
117117
{
118118
//is player currently linked to a platform.
119119
if (linkedObject == null)

0 commit comments

Comments
 (0)