I have a skeletal mesh that I set the world rotation to 0 when changing the mesh to reset the rotation. This works perfectly however, when I then set the skeletal mesh to simulate physics, it rotates 90 degrees in the z axis randomly. This is extremely annoying as I am making a jet viewer for a game and I want the player to be able to see the effects the weapons have on the jets weight and suspension for the jet they have selected.
If i change the skeletal mesh and do not simulate physics after it does not rotate 90 degrees in the z axis. it only happens when I set simulate physics to true.
Please can anyone help with this, I have spent two days fixing this and have gotten nowhere.
Vid would help clarify what you want to happen versus what is happening.
You can see the jet is rotating when the mesh changes only when physics is enabled.
I also lock the location and rotation so that the jet doesnt roll away.
I want the jet to point forwards like it does without simulating physics but I want it to simulate physics so the suspension can bounce and be effected by fuel and weapon weight.
That’s depenetration and offsets.
Spawn, then make sure the mesh is accurately seated to the floor. Then enable physics.
Adjust Damping and center of mass.
I’d also make sure the previous mesh is fully removed from the sim or at least the spawn area. You can teleport it away then destroy.
I do not remove the old mesh I simply set the skeletal mesh asset to the new mesh and change the location so that it is on the ground, and then set the world rotation to 0,0,0. Would it be better to destroy that actor and spawn a new one in as it always works the first time for some reason?
- Teleport up 200cm
- Set skeletal mesh
- Reset rotation
- Trace for ground and teleport to new location
- Enable physics
Spawning is less performative, but a lot easier to get working right without all the adjustments.