Comments (4)
Hi,
I tried it but this issue did not occur.
Would you please share with me how to repro it?
thanks
from kawaiiphysics.
Hi @pafuhana1213 ,
First of all, our team loves Kawaii Physics, thanks a lot for sharing your work.
I am testing the plugin on UE5 and I got the same crash in the same place:
CalcBoneLength(ModifyBones[0], Bones);
\Plugins\KawaiiPhysics\Source\KawaiiPhysics\Private\AnimNode_KawaiiPhysics.cpp LN 200
I have investigated the problem and the crash happens because Bone.BoneRef.BoneIndex is greater than the number of transforms in RefBonePose.
In our case LOD0 has 140 bones and LOD2 has 78 bones. The crash happened when InitModifyBones is called when BoneContainer.CalculatedForLOD is 2 and one modify bone had the boneIndex 90 (RefBonePose contains 78 entries).
The following fix seems to work as expected (changes tagged with [hexworks]):
void FAnimNode_KawaiiPhysics::CalcBoneLength(FKawaiiPhysicsModifyBone& Bone, const TArray<FTransform>& RefBonePose, const FBoneContainer& BoneContainer)//[hexworks] - Added BoneContainer
{
if (Bone.ParentIndex < 0)
{
Bone.LengthFromRoot = 0.0f;
}
else
{
if (!Bone.bDummy)
{
FCompactPoseBoneIndex CompactPoseBoneIndex = Bone.BoneRef.GetCompactPoseIndex(BoneContainer);//[hexworks] - Fix crash indexing Bone.BoneRef.BoneIndex
Bone.LengthFromRoot = ModifyBones[Bone.ParentIndex].LengthFromRoot
+ RefBonePose[CompactPoseBoneIndex.GetInt()].GetLocation().Size();//[hexworks] - Fix crash indexing Bone.BoneRef.BoneIndex
}
else
{
Bone.LengthFromRoot = ModifyBones[Bone.ParentIndex].LengthFromRoot + DummyBoneLength;
}
TotalBoneLength = FMath::Max(TotalBoneLength, Bone.LengthFromRoot);
}
for (int ChildIndex : Bone.ChildIndexs)
{
CalcBoneLength(ModifyBones[ChildIndex], RefBonePose, BoneContainer);//[hexworks] - Added BoneContainer
}
}
It's also required to fix the lines that call CalcBoneLength adding BoneContainer as last parameter.
Could you please check the fix and integrate it in the repo?
Best regards,
sergi
from kawaiiphysics.
お疲れ様です。
私の方でも配列のオーバーランが発生し
CalcBoneLength(ModifyBones[0], BoneContainer.GetRefPoseArray());
に変更して対応しました。
レベル起動後にスケルタルメッシュをカメラの遠く(LODが適用される距離)にスポーンすると発生ように思われます。
from kawaiiphysics.
Hi guys,
Sorry for my late reply...
I succeeded to repro this issue on UE5.1 and committed a9bf985 to fix this now.
thanks!
from kawaiiphysics.
Related Issues (20)
- pelvisからspine3まで子boneをつけるとPhysicsがおかしくなる HOT 1
- NodeのAlphaが0なのに風による影響を受けてしまう HOT 1
- expose as a pin for limits data asset HOT 1
- ver5.4 HOT 2
- Warning when use AnimationIntanceBlueprint Template HOT 1
- Crash in Editmode of Data Asset Limits HOT 2
- Feature Request - a way to see Kawaii Physics bodies in game after BeginPlay
- LimitコリジョンのDataAssetをピン公開するとLimitが機能しないときがある HOT 1
- Spherical/Capsule/Planar shapes are not showing up HOT 2
- Can't compile against engine source HOT 5
- Packed and unable to run in multiplayer games HOT 1
- [Feature Request] Is it possible to fix the end bone position?
- Crashes when updating the constraint limits using characters with multiple LODs HOT 1
- Capsule or other limits cannot handle the skirt collsion with legs
- Constraints between chains for long skirts?
- ue5 crashed when using kawaiiPhysics and ControlRig in levelSsquence HOT 4
- Unable to pack HOT 1
- アニメーションブループリント作業中にUEがクラッシュします。 HOT 1
- Seqeuncer上でSkeletalMeshにバインドされてるKawaiiPysicsに関して
- AdjustByAngleLimit is not working properly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kawaiiphysics.