Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ball jumps on colliders edges
#1
Hello,

I have searched for solutions around the internet and this forum but didn't manage to find a solution.
Hope that you will be able to help.

I am working on 3D project. The track is made by using Curvy Splines 8. The player is a rigidbody ball.
When it moves on track it starts to jump on mesh collider edges.

       

I have try to play with the Project's physics setting and set Rigidbody of the player to "Continuous", but it didn't solve the issue.

       

Best Regard, Dmitrii
Reply
#2
Hi
Have you tried to use the Combine option in the Create Mesh module to module one single mesh? Same question about not using the Split option if you are using it.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
I'd like to add that the edge-jump-issue is a generic Unity physics issue. The same thing happens if you use the default cubes and align them perfectly. You can tweak various physics settings to reduce the issue somewhat, but its impossible to eliminate it completely. The only collider that seem to cope with the issue is the wheel collider.
Reply
#4
(04-25-2022, 09:31 AM)TurboHans Wrote: I'd like to add that the edge-jump-issue is a generic Unity physics issue. The same thing happens if you use the default cubes and align them perfectly. You can tweak various physics settings to reduce the issue somewhat, but its impossible to eliminate it completely. The only collider that seem to cope with the issue is the wheel collider.

Thanks for your helpful feedback
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
(04-25-2022, 01:17 PM)_Aka_ Wrote:
(04-25-2022, 09:31 AM)TurboHans Wrote: I'd like to add that the edge-jump-issue is a generic Unity physics issue. The same thing happens if you use the default cubes and align them perfectly. You can tweak various physics settings to reduce the issue somewhat, but its impossible to eliminate it completely. The only collider that seem to cope with the issue is the wheel collider.

Thanks for your helpful feedback

Yes, it's not to Curve plugin-specific issue, but Unity in general — Totally agree on this one.
Just hoping that tool has the solution on how to deal with it.

I have selected the Combined option but looks like nothing really changed, the track is still generated as several objects/colliders. What I am doing wrongly?
   

Best Regards, Dmitrii
Reply
#6
You will have to set Group Meshes to false, in your Create Track module.
https://curvyeditor.com/documentation/generator/modules/createmesh#group_meshes
Basically Group Meshes combine similar meshes together, but when deforming meshes, every mesh is considered as different, so none is combined.
Did this work?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#7
(04-25-2022, 04:26 PM)_Aka_ Wrote: You will have to set Group Meshes to false, in your Create Track module.
https://curvyeditor.com/documentation/generator/modules/createmesh#group_meshes
Basically Group Meshes combine similar meshes together, but when deforming meshes, every mesh is considered as different, so none is combined.
Did this work?

I managed to create 1 common mesh, but it build a single Mesh collider, in the same way, as it was for independent once.
Is it me who making it wrongly? or is it the regular way of script work?

   

If it's a regular way to create a single mesh, then it doesn't help and it's just sharing the same issue with independent ones.
Perhaps it is possible to set logic that every next mesh will be a bit lower than the previous one?
   

Best Regards, Dmitrii
Reply
#8
Why use a mesh deformer at all? To me it looks like the whole track is basically a U-shape. If thats the case, use shape extrusion instead of mesh deformation. That way it will generate a single connected mesh instead of "stacking" them. Correct me if I'm wrong, but by the looks of the result you get now, it seems as if you get "internal" faces where the meshes connect.

Unity physics being what it is, will make the collision issue worse with internal faces as the collision solver uses face/vertex normal info. And when passing a edge (like the edge on a cube) the edge will have normals pointing "up" and "sideways" at the same time, resulting in multiple shape separation forces, which in turn causes the collision response to be even greater.

Side request for _Aka_ could you add a option to build render-mesh separate from the collision mesh. I've personally run into cases where I want to use a different shape for the collider. And this issue is probably one such case. The only way right now is to use two separate game objects, one with the renderer turned off and the other with the collider turned off. Would have been sweet with a Create Mesh node with two inputs; V Mesh and a separate V Collider.
Reply
#9
(04-26-2022, 06:50 AM)Sacryn Wrote: If thats the case, use shape extrusion instead of mesh deformation (...)

I completely agree. I recommend using the Shape Extrusion module.



(04-26-2022, 06:50 AM)Sacryn Wrote: Side request for _Aka_ could you add a option to build render-mesh separate from the collision mesh. I've personally run into cases where I want to use a different shape for the collider. And this issue is probably one such case. The only way right now is to use two separate game objects, one with the renderer turned off and the other with the collider turned off. Would have been sweet with a Create Mesh node with two inputs; V Mesh and a separate V Collider.


Noted, thanks for the feedback.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rough edges on tight corners migwellian 5 13 03-20-2023, 09:48 AM
Last Post: migwellian
  Scale Deform Mesh Along Spline? / aligning colliders MamasToast 9 71 10-31-2022, 03:44 AM
Last Post: tairoark
  Creating splines from the surface of existing 2d colliders Monomirror 2 486 08-18-2021, 03:55 PM
Last Post: Monomirror
  Mesh Lines - Horizontal and Vertical Edges Krypton 14 4,759 09-23-2020, 02:16 AM
Last Post: Krypton

Forum Jump: