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

How to create block types that don't fill the whole voxel cube? #102

Open
modmatrix opened this issue May 27, 2014 · 3 comments
Open

How to create block types that don't fill the whole voxel cube? #102

modmatrix opened this issue May 27, 2014 · 3 comments

Comments

@modmatrix
Copy link

I'd like to have block types whose geometry only takes up part of a voxel - like the glass panes, slabs, and stairs in Minecraft.

  1. Is that currently possible? Do I need a special module? If so, which one?

That's my main question, but here are some bonus questions if you're feeling generous:

  1. If the answer to 1 is "yes": will my in-game avatar collide with the visible edges of the block, or with the edge of the voxel? For example, if I create a wall of glass panes, will I be able to move partway into that voxel (until I hit the actual glass), or will I hit an invisible wall (the edge of the voxel) just in front of the glass?
  2. If the answer to 2 is "you won't collide with the edge of the voxel": will the player movement routines handle these blocks in a sensible way? For example, if I create a ramp or stair block type, and I run straight into one, will I climb it?

Basically, I'd like to create a game world that allows you to move from lower locations to higher ones without having to jump constantly.

@max-mapper
Copy link
Owner

I don't think this is possible at the moment unfortunately, all the collision code assumes regular cubes (https://www.npmjs.org/package/collide-3d-tilemap, https://github.com/chrisdickinson/aabb-3d)

@modmatrix
Copy link
Author

Okay - thanks for the reply!

@deathcap
Copy link
Collaborator

#103 has experimental support for custom voxel rendering models (via voxel-mesher/shader 0.13+, example use for glass panes: https://github.com/deathcap/voxel-glass) but player collisions treat them as solid cubes. To change this, I think voxel-physical and/or voxel-control would have to be updated (to recognize custom hit boxes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants