Code Monkey home page Code Monkey logo

Comments (4)

Zylann avatar Zylann commented on September 23, 2024

Once again I can't really tell you what this exactly is, because the Godot 3 version is old, and Godot 3 is old too, and I stopped working on that version years ago. I could maybe check this if you see it happen in the current version in Godot 4.
I vaguely remember that there has been a fix that was done at some point where collision was a bit off. I don't remember what it was though, or when. But there could be many other causes I don't even have time to list.
Looking at your screenshot, I fail to distinguish what kind of mismatch you are having. Just the camera clipping with ground?
Another 2 things to keep in mind, is that terrain visuals have LOD, but the collider doesn't. So it won't perfectly match the further away you look. Also, visuals use a diamond-shaped triangles topology, while I believe Bullet/GodotPhysics seem to be using zig-zag triangles (so half of the quads have flipped triangles), so you can't really expect an absolutely perfect match. This is usually not much of a problem though, and you might only be able to see that if you use a very scaled up terrain with large triangles maybe.

from godot_heightmap_plugin.

NoTitleGamesOfficial avatar NoTitleGamesOfficial commented on September 23, 2024

I made a short video, maybe it helps to see the problem: https://youtu.be/j8OOqpq9-1Q

I do know that I can't expect support for an old version, so I'm really thankful for any hint you give me!

from godot_heightmap_plugin.

Zylann avatar Zylann commented on September 23, 2024

If I understand the video correctly, your character is extremely small and walks on a terrain with very big triangles?
If so, then I suspect the discrepancy is simply the choice of geometry for rendering it:

visuals use a diamond-shaped triangles topology, while I believe Bullet/GodotPhysics seem to be using zig-zag triangles (so half of the quads have flipped triangles)

In your video the character is so small and terrain triangles are so big that it probably becomes noticeable. It's just designed that way, and wasn't intented for extreme situations like this one.

If you still want such big triangles and such small player in your game, here is the place where visual triangles are flipped (in the master version, but I think it's roughly the same in yours):

var flip = ((x + reg_origin_x) + (y + reg_origin_y) % 2) % 2 != 0

from godot_heightmap_plugin.

NoTitleGamesOfficial avatar NoTitleGamesOfficial commented on September 23, 2024

I got it fixed by setting every triangle to flipped. Thx for the hint!

from godot_heightmap_plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.