Skip to content

TestHoveringTank crashes if acceleration is applied during initial descent  #1126

@stephengold

Description

@stephengold

The TestHoveringTank sample application starts with the tank gently descending until its invisible wheels touch down. The app will crash with a stream of execution exceptions and assertion failures if you press the "W" (accelerate) key during this period.

I think the bug is in PhysicsHoverControl. Initially, the tank's horizontal velocity is 0. When the "W" key is pressed, the accelerationValue > 0 branch of prePhysicsTick() is executed. Projecting dir onto a zero vector results in a NaN vector, which is eventually applied to the vehicle as a force.

Metadata

Metadata

Assignees

Labels

bugSomething that is supposed to work, but doesn't. More severe than a "defect".examplesspecific to the jme3-examples sub-project

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions