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

[Bullet] Running project gives recover from penetration error. #50628

Closed
Tracked by #45022
ca3games opened this issue Jul 20, 2021 · 3 comments
Closed
Tracked by #45022

[Bullet] Running project gives recover from penetration error. #50628

ca3games opened this issue Jul 20, 2021 · 3 comments

Comments

@ca3games
Copy link

Godot version

3.3.2 (stable official)

System information

Kubuntu 21.04 (Hirsute) GLES 3 renderer.

Issue description

After compiling a project without issues and compiling without error, after 2 minutes on average I get this error:

E 0:00:05.563 recover_from_penetration: Condition "shape_idx < 0 || shape_idx >= cs->getNumChildShapes()" is true. Returned: false
<Fuente C++> modules/bullet/space_bullet.cpp:1294 @ recover_from_penetration()
WALK.gd:41 @ Physics()
FSM.gd:29 @ _physics_process()

The WALK.gd:41 line is:
FSM.Root.move_and_collide(Vector3(dir.x, 0, dir.y), false)

Not sure what causes it, but the project runs without error around 1-2 minutes just fine and then spit that error.

Steps to reproduce

It happens after 1-2 minutes of playing the game.

error

Minimal reproduction project

Flor Game.tar.gz

@pwab
Copy link

pwab commented Aug 31, 2021

I can confirm the error on my system (Windows 10, Ryzen 5, RX 570). But I already get it when pushing one arrow-key once (so not time depended). After receiving the error I just waited a few seconds and got another one which then floods the console log:

E 0:00:12.303   get_quat: Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quat() or call orthonormalized() instead.
  <C++ Error>   Condition "!is_rotation()" is true. Returned: Quat()
  <C++ Source>  core/math/basis.cpp:791 @ get_quat()
  <Stack Trace> FSM.gd:25 @ _process()

This error seems to be time depended because I wasn't able to directly reproduce it.
The errors are pointing at

func Physics(delta):  # <- called on _physics_process
	var dir = FSM.direction * FSM.vel * delta
	FSM.Root.move_and_collide(Vector3(dir.x, 0, dir.y), false)  # <- Error 1

and

func _process(delta):
	current.Update(delta)
	var target_point = Root.translation + Vector3(-direction.x, 0, -direction.y)
	var old_basis = Root.transform.basis
	Root.look_at(target_point, Vector3.UP)
	var target_basis = Root.transform.basis
	Root.transform.basis = old_basis.slerp(target_basis, delta * 10.0)  # <- Error 2

@pouleyKetchoupp pouleyKetchoupp changed the title Running project gives recover from penetration error. [Bullet] Running project gives recover from penetration error. Oct 1, 2021
@rburing
Copy link
Member

rburing commented Jun 18, 2022

Fixed by #59864.

@fabriceci
Copy link
Contributor

I tried with the mrp and the error is gone as @rburing said.

@akien-mga akien-mga added this to the 3.5 milestone Jun 18, 2022
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

7 participants