Skip to content

CharacterVirtual ignores the configured layer filters #6

Description

@jcant0n

Update, ExtendedUpdate, RefreshContacts, StickToFloor, SetShape and WalkStairs all pass {} for Jolt's four filter arguments — 28 occurrences of default-constructed, accept-everything filters in character.cpp.

A CharacterVirtual therefore collides with every body in the system, regardless of the ObjectLayerPairFilter and ObjectVsBroadPhaseLayerFilter the caller configured. Nothing in character.h says so.

For example:

cv(c)->Update(dt, toJphVec3(gravity), {}, {}, {}, {}, *allocator->ptr);

Why this needs deciding rather than just fixing

Anything built on the current behaviour depends on layer-blind character collision. Making the filters real is the correct behaviour but it is a behaviour change, so it wants a deliberate decision rather than arriving inside a version bump.

The tests in JoltC/tests/test_character_extra.c were written to work either way, so they will not have to change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions