-
-
Notifications
You must be signed in to change notification settings - Fork 277
RapierPhysicsPlugin requires generics #501
Copy link
Copy link
Open
Labels
A-Integrationvery bevy specificvery bevy specificC-EnhancementNew feature or requestNew feature or requestD-DifficultNeeds strong technical background, domain knowledge, or impacts are high, needs testing...Needs strong technical background, domain knowledge, or impacts are high, needs testing...P-LowS-not-startedWork has not startedWork has not started
Metadata
Metadata
Assignees
Labels
A-Integrationvery bevy specificvery bevy specificC-EnhancementNew feature or requestNew feature or requestD-DifficultNeeds strong technical background, domain knowledge, or impacts are high, needs testing...Needs strong technical background, domain knowledge, or impacts are high, needs testing...P-LowS-not-startedWork has not startedWork has not started
Type
Fields
Give feedbackNo fields configured for issues without a type.
Trying to add the plugin the way that most Bevy plugins are added fails:
It fails because Rust cannot infer the type for
PhysicsHooks. Instead, you need to do something like this:or:
This isn't obvious for new users, and is especially confusing because the plugin has no documentation example (outside the website's general usage guides). The use of
NoUserDataor the concept of physics hooks isn't even explained on the website before the "Advanced collision-detection" section, even though the plugin initialization is essentially the first thing that a user has to do. It shouldn't be necessary to use generics here.Additionally, limiting the user to a single
PhysicsHookstype feels rather limiting and annoying from a composability standpoint. But that's another issue.