There is a bug linecasting. I added a new body at runtime, and if the world instance was passed into linecast, it would always set new bodies to 0, 0
public function tick(Delta: Float) {
if (!enabled) return;
if (linecastBodies.length == 0) return;
try {
var rayResult = ray.linecast(linecastBodies, /** world **/); // passing the world instance in here produces the bug
if (rayResult != null && !rayResult.data[0].inverse_normal) {
result = rayResult;
} else {
result = null;
}
}
catch (e) {
//
}
}