You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Ensure Bullet HeightMapShape3D data width and depth are at least 2.
This commit is contained in:
@@ -504,6 +504,9 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
|
|||||||
int l_width = d["width"];
|
int l_width = d["width"];
|
||||||
int l_depth = d["depth"];
|
int l_depth = d["depth"];
|
||||||
|
|
||||||
|
ERR_FAIL_COND_MSG(l_width < 2, "Map width must be at least 2.");
|
||||||
|
ERR_FAIL_COND_MSG(l_depth < 2, "Map depth must be at least 2.");
|
||||||
|
|
||||||
// TODO This code will need adjustments if real_t is set to `double`,
|
// TODO This code will need adjustments if real_t is set to `double`,
|
||||||
// because that precision is unnecessary for a heightmap and Bullet doesn't support it...
|
// because that precision is unnecessary for a heightmap and Bullet doesn't support it...
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user