-
-
Notifications
You must be signed in to change notification settings - Fork 490
Editing collisions #730
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
Editing collisions #730
Conversation
for now, a bit unstable
only boxes for now
@qaisjp would you mind to fix enum class issue for me? i have no f**king clue make it |
anyone would fix enums for me? |
The problem with enums is because of some circular include. |
This draft pull request is stale because it has been open for at least 90 days with no activity. Please continue on your draft pull request or it will be closed in 30 days automatically. |
This draft pull request was closed because it has been marked stale for 30 days with no activity. |
Idea of this pr is lets user edit collision.
If you wanna edit collision, load it via
engineLoadCOL
, original collision you can read by model id, but are read-only.Examples:
https://www.youtube.com/watch?v=MtlTJ3GxQ-M
https://www.youtube.com/watch?v=_QV2FkASLas
https://www.youtube.com/watch?v=wCCijVBLPjU
https://www.youtube.com/watch?v=m6gVWZVVj3E
https://www.youtube.com/watch?v=Rt82oFuJ-dM
Test resource:
test.zip
Functions
engineGetModelCollisionProperties
Return table with information about loaded .col file or modelID ( if collision is loadeded )
boundingBox
vecMin
{x,y,z} - minimal position of collisionvecMax
{x,y,z} - maximal position of collisionvecOffset
{x,y,z} - offset of sphereradius
float - radius of bounding spherecolBoxes
int - number of boxes that collision hascolSpheres
int - number of spheres that collision hascolTriangles
int - number of triangles that collision hascolVertices
int - number of vertices that collision hasisModelCollisionLoaded
Checks whether original collision is loaded and can be read.
engineSetModelCollisionData
Changing collision, returns boolean if success, and false if something wrong, second argument returns all wrong triangles, vertices etc.
engineUpdateModelCollisionBoundingBox
Updates collision bounding box, need to be used if
Enums
min
size, false =max
size