Replies: 4 comments 1 reply
-
(sorry for slow response, seen this and will respond later when I am not being eaten by workmonsters) |
Beta Was this translation helpful? Give feedback.
-
Okay finally a nonzero amount of time!
It's not utterly impossible, but as you might have noticed from how long it took to respond to this, my time has become... limited. I don't know what my new rate would be, but it'd be something dumb and I'd feel bad about charging that much. |
Beta Was this translation helpful? Give feedback.
-
Ah, I wasn't aware of that for So I assume And no worries on the paid consulting. I was really planning for about a year in advance, at least, since I'm also swamped and will be going through a lot this year. Thanks for everything as always |
Beta Was this translation helpful? Give feedback.
-
I got it working using the childIndex and checking if it's a mesh, thanks for the help. I still think the xmldoc should mention that explicitly since it wasn't obvious from the current wording :) And I was able to get rid of my jank BVH situation which I'm happy about. I'll be in touch later this year or next year about the other things :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I currently have a car which is a box with 4 wheel raycasts. Currently the wheel raycasts use a layer-based system which I created using
CollidableProperty<>
andIRayHitHandler.AllowTest()
. Each collidable is given some data that's put in myCollidableProperty<>
singleton. This works fine, except it is on a per-collidable basis.My environment is mostly procedurally generated meshes, so the vertices and triangles are all generated together. If I want some portions of a road to have a certain property or apply an effect to the car (for example, grip, speed, SFX, bouncy, and many others) then the only way to do this in bepuphysics is to make each portion its own mesh. I think the suggestion would be to make them into a Compound and use the childIndex, but that also doesn't let me distinguish each surface since
CollidableProperty<>
would apply to the whole compound. Even if it worked, it's probably way worse for performance and when we're using dozens of cars, this may not be scalable for my target performance. Unfortunately, I have many properties right now which need to be tri-based, and I'm currently using a janky BVH tree to approximate the positions of the cars and apply the effects this way, which is taking too much CPU and is quite complex for such a simple goal.In Unity, you can get the "hit triangle" when doing a raycast against a mesh. I think other collidable types always return -1. Since bepuphysics makes no distinction on the type of collidable for
IRayHitHandler
, I can't do that in my case. Since I'm generating vertices and triangles procedurally, it's very easy to assign a list of data for each triangle. If I could somehow get the "hit triangle" from theRayData
, then I could solve all of these problems and add tons of features. I'm especially looking forward to removing my entire BVH approximations which don't always work due to many edge cases.I mentioned that the environment is mostly meshes, but not everything is a mesh. I use lots of boxes as well for performance reasons as well as simplicity. So there can't really be a special
IRayHitHandler
interface for meshes only, since that wouldn't allow my raycasts to work against all surfaces. I thinkIRayHitHandler
orRayData
should provide an extraint
which distinguishes triangles specifically for meshes, and thatint
can be unused for every other collidable. This would be a breaking change, but maybe it can be justified with a higher version number.Thoughts?
On a sidenote for Ross himself:
I have many questions, optimizations, and features like this that I would love to paid consulting for. Is this a possibility in the future? My game may not be fully realized without your help. If I need a custom fork of bepuphysics2 for certain things, it would be great to work on it together. I just need to plan ahead now.
And thanks for all the free resources so far. Even if paid consulting isn't doable, I would love to donate in the future regardless.
Beta Was this translation helpful? Give feedback.
All reactions