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

Prevent "coning" by using PhysX dominance groups. #784

Closed
wants to merge 1 commit into from

Conversation

Hoikas
Copy link
Member

@Hoikas Hoikas commented Jan 21, 2021

This fixes an observed issue by which other players can be moved around by pushing cones (or fire marbles...) into their character controllers.

@@ -598,6 +598,8 @@ physx::PxScene* plPXSimulation::InitSubworld(const plKey& world)
}
#endif

scene->setDominanceGroupPair(plSimDefs::kGroupAvatar, plSimDefs::kGroupDynamic, { 0, 1 });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the significance here of {0, 1}?

Copy link
Member Author

@Hoikas Hoikas Jan 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a physx::PxDominanceGroupPair. The usage of it is a little strange, though... You specify either 0 or 1 to indicate the dominance, but they act sort of like a filter. So in a collision between a cone and an avatar, a cone imparts no momentum onto an avatar, but the avatar imparts momentum unchanged onto a cone.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that seems pretty straightforward.

@Hoikas
Copy link
Member Author

Hoikas commented Jan 27, 2021

We're going to need to wait on merging this one. With this change, attempting to walk on top of the fish baskets in Eder Gira causes them to launch into the stratosphere. I think they may just need more mass... Hopefully...

@Hoikas Hoikas mentioned this pull request Jul 5, 2021
@Hoikas
Copy link
Member Author

Hoikas commented Sep 10, 2021

Maybe one day, I will come back to this.

@Hoikas Hoikas closed this Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants