Can anyone inform me of another way to check if your on the ground or not the way i'm using seems to be inaccurate
SyntheticButton collButton = feetNode.getCollisionEventHandler();
contactDetect.addAction( new InputAction() {
public void performAction( InputActionEvent evt ) {
ContactInfo contactInfo = (ContactInfo) evt.getTriggerData();
Vector3f vec = contactInfo.getContactNormal(null);
if (vec.dot(Vector3f.UNIT_Y) > 1f){
offGround = true;
}
Vector3f vel = contactInfo.getContactVelocity(null);
if (vel.length() > 10){
System.out.println("POWERFUL CONTACT: "+vel.length());
}
}
}, collButton, false );