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"

Collision of a sliding object on Landscape is poor

My player vehicle (hovercraft) is simulated by using a Sphere component for collision. The sphere is constrained by being locked on all axis of rotation so it cannot roll. I propel the craft by using AddForce on the sphere to "push" the craft across the ground.

alt text

This works great on a box brush. I also tried creating a complicated mesh in Blender via their sculpt tool and that seems to work well also, despite being made up of many polygons. The craft is pushed smoothly across the collision mesh without issue.

Landscape is a different story. I created a Landscape of resolution 256x256, only using 1x1 section. Even with a completely flat landscape, the craft "pops" and "catches" on this object, resulting in glitchy movement. It's as though the sphere collider is catching on the edge of polygons in the landscape.

I tried changing the landscape collision thickness but that didn't seem to do anything.

Is there anything I'm missing as far as physics setup on the landscape? What perplexes me most is why landscape performs worse than an imported static mesh. I'm using CCD on the craft and I have sub-stepping enabled.

Product Version: Not Selected
Tags:
more ▼

asked Jun 11 '14 at 04:41 AM in Using UE4

avatar image

sinoth
82 13 13 12

avatar image Tim Hobson ♦♦ STAFF Jun 11 '14 at 07:57 PM

Hi Sinoth,

I can see you have your bounds showing in the image above. Can you post a screenshot of your collision mesh as well? Depending on how that is setup can greatly affect how collision works on the landscape and other objects as well.

Thank you!

Tim

avatar image sinoth Jun 11 '14 at 08:36 PM

Not sure what you mean by collision mesh. The built-in sphere component is the only part of my player that enables collision. The craft itself is purely visual. Can you clarify what you are wanting me to post?

avatar image Tim Hobson ♦♦ STAFF Jun 11 '14 at 08:45 PM

You can view collision in the static mesh viewer by clicking the Collision tab in the toolbar. If you have no collision you will see that in the details to the left upper corner where it says "Null Primitives" it'll list here how many you have. If there is no collision on your model it will list '0'.

If you want to view an example of collision should look on a ship you can view the ship from the Flying Template to get an idea as well.

If you need information on how to create collision if you do not have it on your model let me know and I'll point you towards some documentation to help out.

Thank you!

Tim

Edit: I realize now that I forgot to add the image which probably didn't help you as much. :) alt text

collision.png (301.7 kB)
avatar image sinoth Jun 11 '14 at 08:53 PM

Gotcha -- just to clarify my model does not have collision. It says "Num primitives: 0". The collision for my blueprint is coming solely from a Sphere component. That's why I'm so confused about the Landscape "popping" problems... a sphere is the most simple collision shape and shouldn't have any problems sliding on the surface. And it doesn't have any problems on BSP brushes or imported static meshes... only Landscape.

edit: In case it isn't clear, this is what the component list for my player blueprint looks like: alt text

avatar image Tim Hobson ♦♦ STAFF Jun 11 '14 at 09:32 PM

There are some known collision issues with Landscapes and sharp edges but having a more defined collision mesh will help more than just a sphere. Take a look at the flying template and see how that one is setup. It may help to have collision that is a bit closer to your models dimensions.

Tim

avatar image sinoth Jun 11 '14 at 09:43 PM

The sphere is by design. An axis-locked sphere allows the craft to 'hover' a set distance from the ground, and also makes our collisions more predictable. For example, one game mode includes hitting other balls into a goal... a sphere vs sphere collision is more predictable to the player than detailed mesh vs sphere.

I do not think the sphere is the problem. I cannot stress enough that the sphere solution works great with imported static meshes despite the mesh being more complex (higher resolution) than my testing Landscape.

I have seen similar problems in the past when I was using the Bullet physics engine described at the following link:

http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=4603

Basically collisions were happening with internal edges, which is exactly what it feels like with Landscape. We fixed the problem in my previous game by enabling this btInternalEdgeUtility. I wonder if something similar exists for PhysX? In any case, static meshes ARE currently handled correctly... it is only Landscape that exhibits this bug.

avatar image Tim Hobson ♦♦ STAFF Jun 11 '14 at 10:49 PM

As I pointed out there are known issues with landscapes collision detection but no news on when those will be update or fixed. As a work around you could always use blocking volumes which handle collision better, but beyond that I'm not sure what to tell you. :(

If you're using any Engine Source and want to implement a plugin I read earlier that Rama has released a plugin on the forums that is really a "work around plugin" to enhance how collision is handled specifically for landscapes. I cannot tell you how good it works but he does have videos demonstrating it's capabilities. Forum Post Here

Tim

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

2 answers: sort voted first

Hi Sinoth,

Since I've not heard back from you in a few days I'm going to mark this as resolved for tracking purposes. If you're still having the issue feel free to post here and I'll assist you further with the issue.

Thank you!

Tim

more ▼

answered Jun 16 '14 at 09:13 PM

avatar image

Tim Hobson ♦♦ STAFF
48.9k 887 101 876

avatar image sinoth Jun 16 '14 at 09:35 PM

That's fine. Unfortunately the fix is to simply not use Landscape. I look forward to collision improvements!

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

I solved it. It has to do with the size of the landscape quads. I guess there's some sort of instability with collision with many quads at once. My vehicles in my game work 100x better now that I've scaled up the landscape to where the quads are bigger than the area that the tire contacts the ground. Try making a landscape of scale 100 to 300, where the quads are about 50-100 unreal units across. You may have much better luck.

more ▼

answered Nov 28 '15 at 10:36 AM

avatar image

AdrielKinn
74 2 7 14

(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