here a personal experimental mockup of how I imagine wrapping world edges should look like. bouncing one could be similar just with mirrored stuff. please test and share opinion. note: you might wanna disable auto-cam
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := lua5.1
LOCAL_CFLAGS := -DANDROID
LOCAL_SRC_FILES := lapi.c lauxlib.c lbaselib.c lcode.c ldblib.c ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c liolib.c llex.c lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c loslib.c lparser.c lstate.c lstring.c lstrlib.c ltable.c ltablib.c ltm.c lundump.c lvm.c lzio.c
include $(BUILD_SHARED_LIBRARY)