Skip to content
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

replacePhysicsShape + Character Physics = Crash #968

Closed
UnidayStudio opened this issue Dec 15, 2018 · 1 comment
Closed

replacePhysicsShape + Character Physics = Crash #968

UnidayStudio opened this issue Dec 15, 2018 · 1 comment
Labels

Comments

@UnidayStudio
Copy link
Collaborator

Adding the replacePhysicsShape function to change the physics mesh of an object with the "Character" Physics type = Crashes everywhere.

-When the collision bounds is disables, UPBGE only crashes when hit the ground.
-When enabled, UPBGE crashes by pressing P to start the game.

Example file:
http://pasteall.org/blend/index.php?id=50904

panzergame added a commit that referenced this issue Dec 18, 2018
Previously the shape replacement for character wasn't managed and the previous
shape was deleted without relink to the new shape.

To solve this issue CcdCharacter::ReplaceShape is implemented to replace the
shape, this function is called into ReplaceControllerShape.

As character could not use a non convex shape, some shape replacement may
fail (e.g with triangle mesh) the user notice it with the return value
of obj.replacePhysicsShape which is now a boolean.

Fix issue: #968.
panzergame added a commit that referenced this issue Dec 18, 2018
Previously the shape replacement for character wasn't managed and the previous
shape was deleted without relink to the new shape.

To solve this issue CcdCharacter::ReplaceShape is implemented to replace the
shape, this function is called into ReplaceControllerShape.

As character could not use a non convex shape, some shape replacement may
fail (e.g with triangle mesh) the user notice it with the return value
of obj.replacePhysicsShape which is now a boolean.

Fix issue: #968.
panzergame added a commit that referenced this issue Dec 18, 2018
Previously the shape replacement for character wasn't managed and the previous
shape was deleted without relink to the new shape.

To solve this issue CcdCharacter::ReplaceShape is implemented to replace the
shape, this function is called into ReplaceControllerShape.

As character could not use a non convex shape, some shape replacement may
fail (e.g with triangle mesh) the user notice it with the return value
of obj.replacePhysicsShape which is now a boolean.

Fix issue: #968.
@youle31
Copy link
Collaborator

youle31 commented Jan 7, 2019

fixed by panzergame. Thanks!

@youle31 youle31 closed this as completed Jan 7, 2019
youle31 pushed a commit that referenced this issue May 26, 2019
Previously the shape replacement for character wasn't managed and the previous
shape was deleted without relink to the new shape.

To solve this issue CcdCharacter::ReplaceShape is implemented to replace the
shape, this function is called into ReplaceControllerShape.

As character could not use a non convex shape, some shape replacement may
fail (e.g with triangle mesh) the user notice it with the return value
of obj.replacePhysicsShape which is now a boolean.

Fix issue: #968.
lordloki added a commit that referenced this issue Jan 9, 2021
Previously the shape replacement for character wasn't managed and the
previous shape was deleted without relink to the new shape.

To solve this issue CcdCharacter::ReplaceShape is implemented to replace
the shape, this function is called into ReplaceControllerShape.

As character could not use a non convex shape, some shape replacement
may fail (e.g with triangle mesh) the user notice it with the return
value of obj.replacePhysicsShape which is now a boolean.

Fix issue: #968.

Previously comitted by Panzergame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants