-
Notifications
You must be signed in to change notification settings - Fork 121
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
Trace Results on Chaos bodies #68
Comments
Hmm... I think the body index is for when you trace against an ISM or a skeletal mesh component's collision to map to instances of ISM instances/bones. The physics is similar to landscapes in that it makes the new Chaos bodies on-the-spot and by mimicking using the built in Chaos physics initialization path in our own code, rather than just using the build in stuff. I think to map from chaos hit to entity ID you could change the Userdata of the body to be the entity index? |
Sorry for my question in this issue, but |
Use the Octree for now, its pretty fast but lacks accuracy if the detection box is small.. I have gotten pretty far with adding the bodies to an owning component(plus an owning actor) with the index I wanted in my question. I can post my solution here, though I am not sure what @Megafunk plans to do with his vision on the physics bodies. |
I think it's worthwhile to have actual physics collision callbacks, I think https://forums.unrealengine.com/t/chaos-contact-modification/517748 a contact modifier callback might do it? I can try something to see... |
Also im trying UChaosEventRelay and its looks like right way, but I have no idea how to get it to work |
Hello.
Any way to use a line trace to get the body index? (ie the entity index)? I can use the octree but the Fbox is a little awkward for me.
I tried to set the BodyIndex in BodyInstance so that when I use a line trace I get the body index (ie the entity index) I just get an int that = body count. That doesn't work at all obviously and I have tried a bunch of things, moving the for loop way up and poking and prodding in there.
It was mentioned that the physics here used a similar way the landscape is initialized? I'm assuming the entities are "one thing"?
I tried looking for other methods in source but I couldn't put anything together. ISM uses the BodyIndex as Instance index.
The text was updated successfully, but these errors were encountered: