I'm insane, please help me add to your engine
Posted: Thu Nov 12, 2015 9:07 am
Sorry for the ridiculous titles.
SO.
I've been working on making a custom physics static collidable in BEPU that will allow me to properly and cleanly trace objects into my creation's voxel grid.
... I'm not doing so well.
Rather than dump my code upon you, I've modified the BEPU physics official 'character playground' demo to contain a really simplistic sample of my progress so far.
It's... very low quality, I admit, but... I'm trying and I'm sure with a bit of help I can get it working!
In place of a Voxel grid, I've placed a gigantic cube from Y=0 and down, extending well beyond the limits of the playground.
It should from here be reasonably easy for someone experienced with BEPU to patch this code so it works. By learning from the patches, I should be able to re-apply this knowledge to my actual code and then have a magically working static object.
So, here's my code, in the form of the entire CharacterPlaygroundDemo file with random other stuff dumped at the top. All edits are marked with prefix 'MCMONKEY'.
http://pastebin.com/8PJ02mdX
So what happens when this is run?
The character is stuck in place, beyond jumping, and can be felt to slowly 'sink' downward before hitting solid ground. This sinking is not representative of my original issue as far as I'm aware, but it's possible. The non-movement is representative.
Additionally, all non-static objects are seen to bounce/slide/spin/etc. around arbitrarily when in contact with the new surface. This is relatively representative of the original issue.
So, how might I go about patching this code up to work?
... Sorry again for my failings to accomplish simple tasks.
OH AND there a few "// note"s in that code that might be of interest/relevance.
EDIT: Helps if I keep my variables in order (Updated pastebin link)
SO.
I've been working on making a custom physics static collidable in BEPU that will allow me to properly and cleanly trace objects into my creation's voxel grid.
... I'm not doing so well.
Rather than dump my code upon you, I've modified the BEPU physics official 'character playground' demo to contain a really simplistic sample of my progress so far.
It's... very low quality, I admit, but... I'm trying and I'm sure with a bit of help I can get it working!
In place of a Voxel grid, I've placed a gigantic cube from Y=0 and down, extending well beyond the limits of the playground.
It should from here be reasonably easy for someone experienced with BEPU to patch this code so it works. By learning from the patches, I should be able to re-apply this knowledge to my actual code and then have a magically working static object.
So, here's my code, in the form of the entire CharacterPlaygroundDemo file with random other stuff dumped at the top. All edits are marked with prefix 'MCMONKEY'.
http://pastebin.com/8PJ02mdX
So what happens when this is run?
The character is stuck in place, beyond jumping, and can be felt to slowly 'sink' downward before hitting solid ground. This sinking is not representative of my original issue as far as I'm aware, but it's possible. The non-movement is representative.
Additionally, all non-static objects are seen to bounce/slide/spin/etc. around arbitrarily when in contact with the new surface. This is relatively representative of the original issue.
So, how might I go about patching this code up to work?
... Sorry again for my failings to accomplish simple tasks.
OH AND there a few "// note"s in that code that might be of interest/relevance.
EDIT: Helps if I keep my variables in order (Updated pastebin link)