Solved terrain collision height increases as you get further away from 0,0

Discussion in 'Mod Support' started by Average Person, Jan 22, 2019.

  1. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    582
    I stumbled upon this odd bug as I was setting up my map, when I started driving around the terrain I noticed the vehicle was floating, I restarted the map and tried again, it was fine.
    I started driving away from 0,0 and noticed I was floating again, I decided to take a screenshot at 0,0 and then at 8192,8192 to show this odd bug *This effects both the groundcover & collision height*
    20190121174741_1.jpg 20190121174651_1.jpg
     
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Is the terrain close to the world 0,0,0 coordinates?

    If not, and instead is very far, then probably you are going into precision issues.
     
  3. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    582
    it was 0,0 I even centered it by setting it to -4096 on the x and y and 0 on the z
    I ended up just setting up a new map which seemed to fix it, though I don't know if I would really count that as solved.
     
  4. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    582
    I encountered this bug again and I can't figure out what's causing it, this is a completely different map and I've tried restarted the game.
    I'd also like to mention that the terrain is only offset 40 meters from 0,0 in the x and y direction and 0 on z so I doubt its a floating point accuracy issue.
    20190210172750_1.jpg
     
  5. DuneWulff

    DuneWulff
    Expand Collapse

    Joined:
    Apr 25, 2016
    Messages:
    1,034
    What is the scale of the map?
    I know that really, really large square sizes can make the car clip through and float over terrain.
     
  6. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    582
    The square size is 1 and the map is only 4096x4096
     
  7. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Try visualizing the groundmodel/terrain collision using the apposite tool (in the Debug menu)
     
  8. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    582
    I will try that today but I can confirm that this is a issue with the visual mesh due to the fact that I was importing forest objects from blender and they where lining up with the collision but not the visual mesh, I think it might have something to do with the W axis or whatever its called not being perfectly 0 but I can't set it to 0.
     
  9. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    This happened to me when I was first building my map, it turned out I moved the terrain after importing my height map and that screwed up my ground plane, I just reimported it after I had moved it, and that fixed it.
     
  10. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    582
    Just tested this and it didn't fix the issue, I relaunched the game afterward just to make sure.
     
  11. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    582
    Still having this problem, I was thinking that maybe when I reimported the terrain to test roads it would fix itself but now I can't even test out the map because of this.
    I did get some screenshots showing the ground model.
    I am almost 100% sure at this point that this is a issue with the visual mesh and not the ground model, my reasoning for this is the fact that objects placed on the map with tools like the forest editor line up with the ground model and not the visual mesh.
    20190227191416_1.jpg 20190227191916_1.jpg 20190227191851_1.jpg
     
    #11 Average Person, Feb 28, 2019
    Last edited: Feb 28, 2019
  12. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Can you please provide a copy of the level?
    Unable to replicate by creating any 'brand new' level.
    Include a copy of the heightmap file that you import, so that we can check that too.
     
  13. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    It's strange that moving it didn't solve this. The only thing I can say is that you have more than one terrain loaded but only one is visible or something.
     
  14. Miura

    Miura
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    311
    Rotating the terrain block caused a problem like this. The visual mesh is rotated, but collision mesh isn't. Seems like the terrain can't be set straight once it's rotated, because the editor likes to slightly change the number you put in. However, it should be straight after importing a new terrain, so that is probably not the issue here.
     
    • Like Like x 1
  15. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    That explains why it fixed my situation then, good to know at least =)
     
  16. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    582
    File removed, no longer necessary.
     
    #16 Average Person, Mar 2, 2019
    Last edited: Mar 11, 2019
  17. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    582
    Alright guys I figured out what the issue is and it's definitely a bug.
    To avoid this issue do not touch the terrain coordinates in the editor, even just selecting them will cause this issue.
    Only change the position of your terrain in the mission file.
     
    • Informative Informative x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice