jbs Posted January 13, 2020 Share Posted January 13, 2020 I have the following problem: Im making a first person shooter with js + three.js. Now I wanna do collision detection. So far im doing simple aabb boxes wrapped around everything, but when i comes to complex shapes, like a building, the whole building gets wrapped in 1 aabb hitbox, the whole building becomes unaccessable. What would be a good way around this ? Is there some lib or aalgorithm that creates boxes for complex shapes or would i have to do it manually ? Also, this whole collision thing runs server side, so it shouldnt be too expensive. Quote Link to comment Share on other sites More sharing options...
8Observer8 Posted January 13, 2020 Share Posted January 13, 2020 (edited) I read in this article Real Time Multiplayer in HTML5 that we should to create a fixed physics loop on server and on a client. Server should have high frequency loop for physics and low frequency loop for sending messages to clients. I upload the example from the article on the free Heroku hosting https://battle-world.herokuapp.com/?debug You can run it in two browser windows. Free hosting has limits. If no one runs the application 30 minutes the server will sleep until someone wake up it. To wake up server you need to wait 10-15 seconds. Edited January 13, 2020 by 8Observer8 newBie here 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.