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
Physics #2325
base: master
Are you sure you want to change the base?
Physics #2325
Conversation
the PxJoint is not expecting to get scaled offset and is collapsing auto anchor also if A nd B actor is scaled it will snap the joint in to wrong location added SetTargetAnchor(const Transform& value)
added a hack to prevent editing read only value from being edited
interesting case with colliders not being directly under rb, if the middle node('s) are rotated the collider was in wrong spot on back end
warning: 'OnDebugDraw' overrides a member function but is not marked 'override'
[to do] after a merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small spelling mistakes and a couple questions.
#ifndef STRING2 | ||
#define STRING2(x) #x | ||
#define STRING(x) STRING2(x) | ||
#endif | ||
#pragma message ( __FILE__ "(" STRING(__LINE__) "):" "[Code Mantening] Remove Deprecated code") | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes there is a code inside the engine which is dedicated and expired
this is reminder to remove it
#if 0 // data extractor | ||
|
||
String out = String::Format(L"\n static Float3* points [{0}] = ", input.VertexCount); | ||
out.Append('{'); | ||
auto data = Array<Float3>(input.VertexData, input.VertexCount); | ||
for (size_t i = 0; i < data.Count(); i++) | ||
{ | ||
auto d = data[i]; | ||
out.Append(String::Format(L"\tFloat3({0},{1},{2}),\n", d.X, d.Y, d.Z)); | ||
} | ||
out.Append(L"};"); | ||
if (input.Is16bitIndexData) | ||
{ | ||
auto data2 = Array<PxU16>((PxU16*)input.IndexData, input.IndexCount); | ||
for (size_t i = 0; i < data2.Count(); i++) | ||
{ | ||
auto d = data2[i]; | ||
out.Append(String::Format(L"{0},\n",d)); | ||
} | ||
} | ||
else | ||
{ | ||
auto data2 = Array<PxU32>((PxU32*)input.IndexData, input.IndexCount); | ||
for (size_t i = 0; i < data2.Count(); i++) | ||
{ | ||
auto d = data2[i]; | ||
out.Append(String::Format(L"{0},\n", d)); | ||
} | ||
} | ||
|
||
LOG_STR(Info, out.ToString()); | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is not used? does it need to stay? maybe for debug purposes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is not used?
yes it is unused
does it need to stay?
idk i used it to extract verts for breaking and just left it there
maybe for debug purposes?
if somfing break it will have use
note is striped from compilation any way
//template code for Deprecated code at some version | ||
//----------------------------------------------------------------------------------- | ||
// find and replace, legend / info | ||
//----------------------------------------------------------------------------------- | ||
// <depMAJOR> major version (0-...) | ||
// <depMINOR> minor version (0-9) | ||
//----------------------------------------------------------------------------------- | ||
// requerd inclide | ||
//----------------------------------------------------------------------------------- | ||
// FlaxEngine.Gen.h | ||
//----------------------------------------------------------------------------------- | ||
|
||
|
||
#pragma region Deprecated | ||
#if (FLAXENGINE_VERSION_MAJOR != <depMAJOR> && (FLAXENGINE_VERSION_MINOR >= <depMINOR>)) | ||
//<Deprecated code here> | ||
|
||
#else | ||
#ifndef STRING2 | ||
#define STRING2(x) #x | ||
#define STRING(x) STRING2(x) | ||
#endif | ||
#pragma message ( __FILE__ "(" STRING(__LINE__) "):" "[Code Mantening] Remove Deprecated code") | ||
#endif | ||
#pragma endregion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess Mafi can decide if he wants this.
throwed on backlog might be done some day
Fixed joints including scale in calculations
the PxJoint is not expecting to get scaled offset and is collapsing auto anchor if A or B actor is scaled it will snap the joint in to wrong location
added SetTargetAnchor(const Transform& value)
Display Attached Colliders
when selecting rigid body it will show all attached colliders for the rigidbody.
can be enabled or disabled per object using DisplayAttachedColliders
Remove thick frame from box collider
when working with small enough collider it hard to set up good collisions for it
as a example
this got me on side quest to re doing coliders See: Better colliders
Better colliders
Colliders
Triggers
INFO:
Debug shapes need some more work put in to look better (there is some over draw and weird shading)
Tasks list