Collision against Spline Mesh

I’m tracing a line from my car to -ve Z-Axis and my line trace doesn’t trace against this spline. Why is that although the spline has collision and my car runs on the spline finely. The line traces successfully against other meshes like cubes and spheres.
Note: My spline doesn’t have any collision added in Static Mesh Editor, I just set the collision complexity to “Use Complex Collision as Simple”.
2bed810d923a2175db66cee89fdca60e8547e023

Hey there @Adeel_Yaqoob! So your SplineMesh has it’s own collision settings as well. What type of trace are you using and what is it filtering? May I also see the collision settings of the spline mesh as well? It should have it’s collision type as block all if it’s meant to.

Have you ticked the “Trace Complex” box in the linetrace?

Collision properties of Static mesh used in the spline or Collision properties of Spline itself?

@StefanEvert I ticked Trace Complex and now even for other meshes like cubes and spheres the trace is failing and for the spline still failing.

The mesh itself will be the only thing that returns any hits, the spline itself is only information laid out in different locations. Your static mesh needs to have some form of collision. You should be able to create a new basic collision for your mesh unless it needs to be complex.

So if you can slide over to your SM and enable seeing both the simple collision and the complex collision

The should be there regardless, but it may not have a simple. The easiest way would be to use the autocollision feature, but if you have a mesh you could handle with cubes, I’d use them instead for clarity.

image

then depending on the complexity of your model:

Then try your trace again and let me know how it goes.

1 Like

I figured out the issue, I enable double-sided geometry in Static Mesh Editor and now Line Trace is going successful.
Thank You all.
image

2 Likes

Glad you figured it out! Considering that fixed it, I’d recommend taking a glance at the normals of the mesh if this comes up again, just to make sure they are correct. Double sided geo fixing it points at the original issue a bit in that direction.

1 Like

Sure, I’ll look into it, I have one more problem and that is with the physics material of the spline mesh. I’m applying a physics material having more resistance but It’s not working on spline mesh however the same physics material does work on other normal meshes like cubes and floor. Can you help in this?

I can try! I’m currently using the Splinemesh component in UE5 and it’s working fine. The second test is in UE 4.27 and physical materials are working on spline mesh as well. Do both of objects have a physical material attached? In my example the right one has 10 friction (over the max of 1) and the slippery one has a 0 friction so it’s rather extreme in my test bed to see if it was working quickly.

2022-10-26_03-55-53
2022-10-26_04-15-04

Yes both have physical Material Applied. Ok, Are you applying these Physical Materials on Static Mesh or on Spline Mesh?

The both have physical materials, spline mesh and the SM’s on top of them.

1 Like

Hope I get the solution, I’m still stuck.

In the meantime I’ll remove the solution tag so others can feel more inclined to chime in if they’d like.

May I see your spline mesh, it’s settings, the physical materials, and then the static meshes you’re testing it with?

Sure,
Here is the spline mesh Static Mesh Settings:

Here is the physical Material I’m applying:

Here is the photo of both:

Here is the comparison between both surfaces having same Physical Material:

Ahhh that provides greater insight for sure! So can you run a quick test like how I did mine with just some SMs sliding down each ramp? I want to rule out if it’s the chaos vehicle alone that’s unable react to the physical material because it’s attached to the spline-mesh, or if the spline mesh is just not applying it at all to anything. That will help us determine the next course of action!

Right one is Spline while left one is Normal Static Mesh

Both Spline and other SM have slippery Physics Material and both cubes have Slippery Physics Material but both cubes slip on the normal mesh but still on Spline. I think no physical material is working on the spline.

Slippery Physical Material:

Ahhhh I’m thinking it may be because we’re using the complex collision for the spline. If I remember correctly for SMs if it’s a complex trace and tracing complex collision it may ignore the simple physical material.

Think I cracked it. Looks like if you use complex as simple on the mesh the physical material gets ignored entirely.

UE4Editor_2022-10-28_12-17-54

I thought you remember that. Now how to use physics material on spline?

Sorry about that! It looks like complex triangulated meshes cannot be used for physical material parses. So we may need to swap your mesh back from complex to simple and maybe make a solid convex hull or custom. If it’s a track we should be able to get away with simple collisions if we can work around your original issue with that double sided geo.

1 Like