Surface Snapping with Landscapes not working properly

I’m still running a few test scenarios, but it seems the “Surface Snapping” to the landscape bugs out and doesn’t work in certain conditions.

I will verify this once again but when you have started the editor up for the first time since 4.4. The Surface Snapping feature is on and is working. However, once I go and toggle it off and back on, it breaks landscape surface snapping.

Any suggestions on this? I will try this in another new project. I did just downloaded the vehicle game freshly and verified it once. Repeating the test again.

Ok, so the vehiclegame marketplace download in 4.4 is a great test object for this.

I re-downloaded it and I was snapping to the “lake2” actor under the landscape. So the surface snapping couldn’t handle between the actor and landscape. I removed the “Lake2” out of the scene and stopped that from happening. Thats bug 1 :slight_smile:

Secondly, I am not able to snap to the landscape at all, just the models or laid track. This seems like bug 2.

Thanks for any feedback on this. This was replicated outside of my codebase and with the marketplace vehicle game.

P.S. :slight_smile:
I also downloaded 4.2 vehicle game and saw the landscape snapping on content browser “drag out” working in that version but not 4.4.

However, once I go and toggle it off
and back on, it breaks landscape
surface snapping.

I was not able to reproduce this in a new project. Are you able to do so. If so can you give detailed repro steps? I made a cluster of 7-8 meshes to drag around with my test.

I was snapping to the “lake2” actor
under the landscape. So the surface
snapping couldn’t handle between the
actor and landscape. I removed the
“Lake2” out of the scene and stopped
that from happening. Thats bug 1 :slight_smile:

I was not able to reproduce this one either. I tested this in a new project with a similar setup. I was able to paint under the water plane. Are you seeing the same results in a new project and not one that is available?

Thank you!

Tim

Thanks Tim for the quick response. Here is a quick video to show exactly what I did.

1) I showed the Drag from Content Browser to Landscape was working in 4.2
2) I then switched to Unreal Engine 4.4, Created a brand new Vehicle Project
3) I showed the Drag from the Content Browser dropped to the big sand pit on the bottom, Lake2... instead of the landscape
4) I deleted lake2, and now the model just follows onscreen or snaps to models, bu not the landscape.
5) I also show the settings I have set 

Let me know what else I can answer. I’m more than glad to do so.

Thanks!

#Dragging From Content Onto Landscape Bugged in 4.4

I can confirm that dragging from content browser onto a landscape is bugged in 4.4, causing the mesh to appear well below the surface of the landscape

This was the first thing I noticed when I loaded the editor in 4.4 :slight_smile:

It was not an issue in 4.3!

Rama

I am seeing the same issue. It was working fine in 4.3, but now I have to spend extra time placing models. Please fix this! :slight_smile:

Did you guys check this out any further?

I can see this happening in the Vehicle Game and I’ve been able to create new landscapes that do not have the issue. I’ve gone through a whole host of things to see if I could get the meshes to snap to the Landscape but have been unsuccessful.

I’ve setup a similar setup in a new blank project that only includes starter content and have been unsuccessful. If this is only happening in this project and is not reproducible in a new blank project this makes it hard to report something like this.

If you’re able to replicate this in a new project please let me know and I’ll test on my end to submit the bug report.

Thank you!

Tim

I have the same problem. Please help! :frowning: You can look at this here:
What’s bad I can’t turn off surface snapping :frowning:

#Its Not Just One Project

Dear Tim,

I made a new landscape from scratch, in 4.4, and I reproduced this problem immediately, and it was the first thing I noticed in 4.4

This is NOT limited to one project!

It happens every time for me, in a new landscape created in 4.4

Again, referring to dragging a static mesh from content browser onto a landscape

I have been using and working carefully with landscapes and helping to fix bugs for them since the beta, and this is a new bug in 4.4

Please take this very seriously!

Rama

Hi guys, could you test snapping if you change this code:

ActorPositioning.cpp
bool IsHitIgnored(const FHitResult& InHit, const FSceneView& InSceneView)

if (PrimitiveComponent && PrimitiveComponent->IsA(ULandscapeHeightfieldCollisionComponent::StaticClass()))
	{
		//DC BEGIN 2014/08/19 pbak: temporary fix of broken placing objects on landscapes
		return false;
		//DC END
		//PrimitiveComponent = CastChecked<ULandscapeHeightfieldCollisionComponent>(PrimitiveComponent)->RenderComponent.Get();
	}

Regards

Pierdek

Thanks Pierdek!

That fixes the problem. So the real issue is in that check.

I verified changing all of the options for Surface Snapping, and it all works great.

:thumbsup:

#Thank You Pierdek!

Thank you for your prompt and complete solution to this issue!

Great to hear from you!

Thank you for the code!

:slight_smile:

Rama

I’m still not convinced about this fix, because I still don’t know why someone checks in this code if ULandscapeHeightfieldCollisionComponent has Rendercomponent, and why ULandscapeHeightfieldCollisionComponent may not have it. The true issue can be somewhere else:(, so we need treat this solution as temporary one.

I have another request to your guys, can you check if play from here works on that parts of landscape where snapping was broken?

Yes, play from here worked just fine.

The only “weird” thing that I see is if I bring the mouse close to the bottom viewport edge, the model will pop below the surface. The same goes for dragging near the other edges as well.

To Recap here:

There are the issues that I’m able to see here:

    1. Snap to surface not working with Landscapes and snapping below landscape. (Not able to reproduce in a blank new project or with a new landscape in the Vehicle Game demo)
    1. Using snap to surface will cause the object to pop closer to the camera and not the surface (I am able to reproduce this) video is a clear demo of this
    1. Cannot disable Surface Snapping after unchecking the box (I’m not able to reproduce this)
    1. I can get an occasional “hiccup” with the snap to on a landscape that will shift the mesh I have up slightly in certain spots. It will sometimes place above or below the landscape but is not the same as what was demonstrated in your the video from Davero on Vehicle Game demo.

@ Davero: #4 is as close as I could get to what you were seeing but it is not the same thing that is happening. My mesh will snap to the landscape but on some parts will shift up or down a few centimeters.

@ : Thanks for the video for this one. I’ve been able to see this behavior, but I’ll attach a link to your vid for our bug report when it’s being repro’ed.

I’ll edit this post once I get some Bug Reports submitted.

I’ve actually just tested in one of our builds from late last week and have not seen the same issues. Some of these appear to be cleared up in this build.

Specifically #2, and #4.

I still cannot reproduce the other issues and without a clear reproducible set of steps it will make it nearly impossible for a developer to reproduce and test. This needs to be able to be done in a project that is new with no code changes or projects you’ve been working on. This allows us to see if we can reproduce it without adding to complexity.

I have the same issue. It works fine on all other levels I have saved, except for one. Toggling the setting does nothing on the level where it does not work. 4.4.0 version