-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rotating cubes an misaligned cubes #7
Comments
i was reading abut voxels in the week. wikipedia states: |
I think the camera should be allowed to go wherever we want to put it. No grid / angle restriction. If we are sticking to the wiki voxel then yeah the cubes must be aligned to the grid and can't rotate at angles other than 90 degrees. Which is not what we currently have. We should think of some structures for storing objects in the 3D grid, there's a couple of ways I can think of at the moment not sure which is best.
|
i kind of means that if you're in first person perspective and seeing out of a characters eyes which can only rotate 90 degrees (i guess in a snap to grid motion) then you're going to be looking north and then immediately east. the use of a 3d array means we will be limited to a size though? which would also be different for different devices? if we used a linked list of current objects (these are arrays of pos_t) including a global position and direction, then animations would simply move objects a set size in the 3d space. |
Yeah I get you now. I thought 1st person was 3rd person. 1st person would not look good you're right, we could perhaps just smooth the camera out if we wanted 1st person. Well we would set our 3D array to the level size which isn't device specific...unless it was a level that was huge and there wasn't enough memory. 3D array is good for collision detection, if the pixel is already set then we've had a collision. But we can use a lot of memory. If a 100x100x100 level is big enough then we should be fine. 1000x1000x100 is like 400MB on a 32 bit device, before we've allocated colours etc. A linked list would probably be better anyway, we will likely need such a thing so we can reference a particular object in a level anyway. If collision detection is slow we can do fancy things like use octrees. |
Do we want to go down the path of allowing cubes that aren't aligned to a grid? We have started that way, but looking at voxatron I'm not sure they allow this. Aligned to grid cubes will make collision detection easier.
There's also the question of whether cubes can be rotated at angles other than 90 degrees?
The text was updated successfully, but these errors were encountered: