Assigning a new ColliderShape into CharacterComponent and running ComposeShape() causes a UAF related exception to be thrown. Related to an issue with the KinematicCharacter reference inside of the discreteDynamicWorld in the Simulation object.
Solution would be to add additional setup to a overridden ComposeShape() method inside CharacterComponent. This setup would include the complete removal, reconstruction and reintegration of the KinematicCharacterController to the Simulation. Also added an additional function to try and maintain various physics properties onto the KinematicCharacter such as Gravity, Fallspeed, etc.
PR Details
Assigning a new
ColliderShape
intoCharacterComponent
and runningComposeShape()
causes a UAF related exception to be thrown. Related to an issue with theKinematicCharacter
reference inside of thediscreteDynamicWorld
in theSimulation
object.Solution would be to add additional setup to a overridden
ComposeShape()
method inside CharacterComponent. This setup would include the complete removal, reconstruction and reintegration of the KinematicCharacterController to the Simulation. Also added an additional function to try and maintain various physics properties onto theKinematicCharacter
such as Gravity, Fallspeed, etc.Related Issue
https://github.com/stride3d/stride/issues/2005
Types of changes
Checklist