Skip to content

fix(resource/menu): teleport to waypoint while in noclip - #1155

Open
nullbrik wants to merge 1 commit into
citizenfx:developfrom
nullbrik:fix/noclip-tp-waypoint
Open

nullbrik wants to merge 1 commit into
citizenfx:developfrom
nullbrik:fix/noclip-tp-waypoint

Conversation

@nullbrik

Copy link
Copy Markdown

When using "TP to waypoint" with noclip enabled, the freecam was placed at z=0, ending up under the map. The ground Z was only calculated for the normal teleport, not in handleTpForFreecam.

This PR moves the ped and freecam to the target area, waits for the world collision and then resolves the ground Z before placing the camera slightly above it.

The ground Z retry loop was moved to a resolveGroundZ() helper shared by both teleport modes.

This also includes the fix from #1090 (undefined _z variable in the ground Z loop), so that PR can be closed if this one is merged.

@nullbrik
nullbrik requested a review from tabarra as a code owner October 27, 2026 05:26
@nullbrik
nullbrik force-pushed the fix/noclip-tp-waypoint branch from ae93187 to fd7aac9 Compare October 27, 2026 05:27
Signed-off-by: nullbrik <returnprime@proton.me>
@nullbrik
nullbrik force-pushed the fix/noclip-tp-waypoint branch from fd7aac9 to b8b967e Compare October 27, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant