public boolean contains(Vector3 vec) { Vector3 temp = new Vector3(vec); Matrix4 tempMat = new Matrix4(modelMatrix); tempMat.inv(); temp.mul(tempMat); if (box.contains(temp)) { return true; } return false; }
private void renderSource(DebugRenderContext context, AudioSourceComponent listenerComponent) { GenericBatch batch = context.batch; Camera camera = context.camera; listenerComponent.getTransform(transform); transform.getTranslation(position); transform.setToLookAt(position, camera.position, up); Matrix4.inv(transform.val); batch.set2dTransform(transform); batch.render(listenerSprite); }