Raycasts Miss Hitting Terrain Frequently

The terrain tools currently have a Raycasts issue which clips through different type of terrain materials and doesn’t go on the Y-Axis. I’ve currently found a temporary solution which is to change the collision group ID from 0 to 1 via the terrain properties tab. Surprisingly this Raycast issue fixes itself. I hope this solves your situation temporally until there is a public fix for the bug. :v:

image

11 Likes

What an interesting workaround. I’ll add it to the main post so it gets more exposure. Hopefully the underlying issue will be remedied sooner rather than later.

1 Like

I have also started to experience this. Only started a few days ago. Terrain tools are basically un-usable now :frowning:
Happening in every place I do.

(update: by placing a single brick into workspace, it seemed to solve the issues? super strange… tried it multiple times to replicate this bug/weird thing)
https://gyazo.com/fb67bb4d8553c80220e9da28f9b2d399
https://gyazo.com/24a5ae2974a7f3c4f1789f2afd3a14aa

2 Likes

If that’s so, what’s the difference between collision group 0 and 1? Is there a specific collision that changes? Sorry that I can’t really word it properly

Yeah, same exact thing happening here. I figured out that it works if you make a copy of the game and work on it in a local file personally. But it’s annoying when I’m trying to work on something with other people within my team and unable to do the progress with them.

1 Like

There’s probably something wrong in the Raycast detection where it’s ignoring Terrain when set to the “Default” collision group (collision group id = 0), you can actually set it to any of the other 31 collision group ids and it will work fine.

I see. The only issue was that setting the collision group to anything other than 0 in the actual game lags people out. I think that’ll just be a small flaw that I’ll have to deal with for the time being.

Awesome find, however I’d like to add that the solution is not consistent as I’ve ran into the issue even at 1.

An additional workaround is to alternate between 0 and 1 whenever the issue occurs at either of them.

2 Likes

Fascinating, I have never worked with collision groups ever before to be honest. The issue I ran into with the collision group ID not being 0 is that I fall through thin terrains (terrains that are 2 studs thick), but again, small sacrifice that I’d have to make.

Just as a side question, what do you think caused this issue? Is it a ROBLOX internal bug that popped up randomly out of nowhere, or is it an update that’s made by them in release 456?

It’s hard to say what changes are made internally each update. Of course the update log shares the most useful and relevant data to developers, but many more changes happen behind the scenes. My guess is that either the Terrain Instance had some collision code updated that can cause it to malfunction in certain circumstances, or that the Raycast function was changed and now can sometimes fail to detect Terrain under various circumstances. The change(s) that cause the bug went live in 465, but if the studio team cannot recreate the issue in-house then it is hard to figure out the cause of the bug and therefore difficult to fix it.

1 Like

having this issue to, if i raycast from top to bottom on a part the position of the part on Y Axis clips through the terrain as if its being ignored at first, then gets the terrain position, seems to behave different based on material, rock is the material clipping with raycast for me, grass works perfectly fine