Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skew transform doesn't work correctly for HeightMapShape #56824

Closed
kocsis1david opened this issue Jan 15, 2022 · 2 comments
Closed

Skew transform doesn't work correctly for HeightMapShape #56824

kocsis1david opened this issue Jan 15, 2022 · 2 comments

Comments

@kocsis1david
Copy link

Godot version

v3.4.2.stable.official [45eaa2d]

System information

Windows 10

Issue description

When skew transform is applied to a HeightMapShape, ray casting works strangely. Seems like the shape remained rectangular instead of a parallelogram.

Steps to reproduce

  • Create a plane
  • Add a StaticBody child with HeightMapShape collision shape, the size should be 3*3, so it matches the plane size
  • Ray casting should work correctly now, because the collision shape is the same as the plane
  • Change the transformation matrix to skew
  • The plane render is rendered with the skew transform, but ray casting doesn't respect the skew transform

Minimal reproduction project

https://github.com/kocsis1david/godot-height-map-test

The ray intersection is printed to the console, but I get an empty result when I hover the mouse over the corner of the plane.

image

@Calinou
Copy link
Member

Calinou commented Jan 15, 2022

Related to #41685. For the record, this was cross-posted on Reddit: https://www.reddit.com/r/godot/comments/s4jvi3/heightmapshape_skew/

Scaling collision shapes is not supported in Godot. It can sometimes work with uniform scaling, but it will pretty much never work reliably when using non-uniform scaling (which includes skewing).

@akien-mga
Copy link
Member

Fixed by #77281.

akien-mga pushed a commit to akien-mga/godot that referenced this issue Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants