Skip to content
Discussion options

You must be logged in to vote

The doc line is ambiguous but the parameter name is the tell: it's inObjectLayer, the layer the wheel itself is treated as being on for the query, not the layer you want to hit.

Look at how it's used internally, e.g. VehicleCollisionTesterCastSphere::Collide:

const DefaultBroadPhaseLayerFilter default_broadphase_layer_filter = inPhysicsSystem.GetDefaultBroadPhaseLayerFilter(mObjectLayer);
const DefaultObjectLayerFilter default_object_layer_filter = inPhysicsSystem.GetDefaultLayerFilter(mObjectLayer);

VehicleCollisionTester.cpp#L127-L131

GetDefaultLayerFilter just wraps your ObjectLayerPairFilter with that layer as the "own" side of the pair test:

virtual bool ShouldCollide(ObjectLayer inL…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jrouwe
Comment options

Answer selected by MrGreenWithAGun
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants