x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Seams between floor tiles produce collision/physics artifacts when rolling over them

In my project I am shooting and making balls roll on the floor using the built-in physics system. Everything was working nicely while I was using a big seamless plane as my floor, but the moment I started building real levels with floor tiles the balls began "hitting" the seams between the tiles and jumping around. I have tried placing the tiles as well as I could, with a little gap between the tiles or with a bit of overlap with no difference. I have also tried using simple (bounding box) and complex collision for the individual tiles. Here is an example pic:

alt text

As you can see, the ball trajectory is traced in green and there are two tiles in the floor. When the ball rolls over the seam between the two tiles it suddenly jumps into the air.

Any ideas? Thanks.

Product Version: Not Selected
Tags:
jump.jpg (63.2 kB)
more ▼

asked Nov 04 '14 at 10:43 AM in C++ Programming

avatar image

Gatherer
71 6 8 16

avatar image MikaelH Sep 21 '15 at 04:13 PM

Did you ever find a solution to this issue? I've run into it myself and this unanswered question is all I can find on the matter.

avatar image Gatherer Oct 05 '15 at 07:55 AM

I didn't find any solution and it seems it is a physx issue. I ended up developing my own physics engine.

avatar image hiili Oct 06 '15 at 09:45 AM

Here is an article discussing the issue and offering some workarounds (and a real solution for Box2D-based Unity games): http://www.iforce2d.net/b2dtut/ghost-vertices

See also this Unity thread on the subject: http://forum.unity3d.com/threads/rigidbody-getting-stuck-on-tiled-wall.220861/

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

For the sake of spreading the information; I did find a thread discussing the subject and according to staff the problem is tied to a limitation in the engine, and there isn't really anything that can be done about it.

https://answers.unrealengine.com/questions/33049/weird-collision.html

more ▼

answered Oct 07 '15 at 10:13 PM

avatar image

MikaelH
6 1 2

(comments are locked)
10|2000 characters needed characters left

I found a solution for this in Unity, I'm sure it's also applicable to Unreal:

Make a giant collider on top of your "bad seams colliders". This is the collider you will actually collide with. It can be much larger than the actual area of the If the seams collider is a Mesh collider, typically the "good collider" will be the same mesh with a convex simplification (not sure how to do this in Unreal, but it's a checkbox on the mesh collider in Unity). Otherwise just make a giant, simplified box collider overtop of your bad seams. When your on top of a collider with seams, you collide with the "giant" collider, otherwise you fall through the giant collider.

In detail: Put the convex/giant collider on a "seam fix" layer, and the other collider on a "seam bad" layer. Have 2 physics layers (not sure how these work in Unreal) for your player. One is the regular player layer, the other is the "player seam fix" layer. Setup your layers so your player layer collides with "seam bad" but not "seam fix" and "player seam fix" collides with "seam fix" and not "seam bad".

In Update, use a BoxCast/SphereCast/RayCast or w/e to determine if your on top of the "seam bad" collider, if you are switch to "seam fix" else stay on player regular. Switching to player regular when your not on the "seam bad" collider ensures that you fall through the simplified collider when your not touching the "seam bad" layer.

The "seam fix" layer is a simplified collider without the seam problem, so this script essentially makes it so you only collide with the giant collider if your on top of the bad seam collider and allows you to fall through the giant collider otherwise.

It's working very well for my game with a physx rigid body character controller.

more ▼

answered Feb 08 '17 at 04:33 AM

avatar image

00jknight
6 2

(comments are locked)
10|2000 characters needed characters left

Here's an update on this situation, for future viewers.

There is an option in the Project Settings called Contact Offset. Project Settings -> Engine-Physics -> Simulation. There are three settings for contact offset. Contact Offset Multiplier, Min Contact Offset, and Max Contact Offset. I lowered the min and max offset values to get a much better response in the collision behavior.

Here are my settings:

  • Contact Offset Multiplier = 0.02

  • Min Contact Offset = 0.01

  • Max Contact Offset = 0.05

My settings are just a shot in the dark. They may not be the most optimal settings, since I actually do not completely understand what the meaning behind each value is. The matter of the fact is that they will eliminate this ugly bouncing on collision mesh seams that happens by default.

Thanks to some lovely folks on the forum for discussing a good solution: https://forums.unrealengine.com/development-discussion/content-creation/50364-rolling-ball-jumps-on-flat-surface

more ▼

answered Dec 21 '17 at 07:34 PM

avatar image

KyleKaja
13 1 4

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question