Skip to content

Entity:frictionSnapshot() issues #3628

@raven1934

Description

@raven1934

Describe the bug

Hey, I've been recently testing frictionSnapshot function of entity class and noticed the normal it returns is always surface normal not the normal on which the friction acts on aka. If its sliding friction this should be tangent normal of the slidesurface, I also think it would be highly improved if it returned the entity that it interacted with aka. entity or world or such... Without ability to filter the snapshot correctly it leaves lot to be desired for the function and as the default https://wiki.facepunch.com/gmod/PhysObj:GetFrictionSnapshot already returns the physObject in lua side we could possibly easily link the parent entity of the physObject as the return value for the function... Also the Material and MaterialOther inputs from the frictionSnapShot could be very useful for stuff that behaves differently depending on what surface its on.

How to reproduce the bug

FS=Entity:frictionSnapshot()

printTable(FS)

interval(1000)

#Don't use runOnTick on this as it risks crashing the server if you print the table!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions