Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing the world instance to linecast repositiones new bodies at 0,0 #33

Open
yesitsfebreeze opened this issue Jun 21, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@yesitsfebreeze
Copy link

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) {
   //
 }
}
@AustinEast AustinEast added the bug Something isn't working label Aug 3, 2022
@MondayHopscotch
Copy link
Contributor

I just spent 3 hours trying to figure out why my bodies were getting stuck at 0,0 and not rotating. Finally pinned it down to passing the world to my linecast_all. Came here to post a bug, and see that it's a known issue. I haven't figured out what is causing it yet, but definitely have felt the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants