Comments (6)
is collision detection being done using the current location, if so it should either be changed to handle a collision anywhere on the line from the previous location to the current location, or fall speed should be capped at a limit so that you cannot completely move through a box when falling maybe.
from craft.
Collision detection uses the current location. See the collide
method.
from craft.
Ta, I have been following this project but haven't had a chance to apply anything. If no one else gets to it i might have a go at fixing collision to check for intersection over the step from N-1 to N
from craft.
It's not too crazy to cap the falling speed. Bodies falling DO have a maximum speed.
Anyhow, this doesn't fix the fact that collision of a body at high speed could fail being detected.
@Bergasms At a higher speed could N-1 to N not be enough??
from craft.
N-1 to N will always be enough, As there will always be an N-1 such that the player has not fallen through the block, followed by an N where they have either contacted or passed through the block. Maintaining the players location at the previous tick is useful for all sorts of reasons as well. If the player somehow gets themselves into an invalid position you can just roll them back.
from craft.
@Bergasms Totally right, you used the segment to check for a block in the middle, ty!!
from craft.
Related Issues (20)
- Port to browser using Webassembly HOT 4
- well it seems there is a ad ware trojan in the files HOT 6
- new structure added without announcement?! HOT 1
- Crash report cant fix HOT 1
- Seeding the world from sqlite HOT 1
- Fix Minecraft GLFW Error 65542 WGL The driver does not appear to support opengl HOT 2
- the builder.py and the server.py and the world.py giving error HOT 1
- How to add new blocks ? HOT 3
- client.c: use static for "char buffer[1024];" HOT 1
- How to run on retroarch xbox?
- Build error win10 HOT 1
- Found a possible security concern
- when i play on my server in chat say smth HOT 2
- Build and install for Ubuntu HOT 1
- "cmake ." results in "fatal error LNK1104: can't open file 'kernel32.lib'" HOT 1
- Potential memory leak. HOT 3
- Server
- thank you for releasing the code
- Can't build HOT 1
- An app on the play store seems to be using this for their Minecraft clone.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from craft.