Skip to content

Laser collision change #4591

@BartegReunificated

Description

@BartegReunificated

Lasers collide with trees and other obstacles way too frequently, while bullets do not
I understand the reason behind it, but since lasers should technically be meant for long range applications they shouldn't collide with foliage as often

The suggestion is to change the current code defining the chance of a laser colliding with a tree or rock from
cs if (!Rand.Chance(thing.def.fillPercent * plant.Growth))
{
continue;
}

to

var accuracyFactor = def.projectile.alwaysFreeIntercept ? 1 : (thing.Position - OriginIV3).LengthHorizontal / 40 * AccuracyFactor;
var chance = thing.def.fillPercent * accuracyFactor;

Just like it is for bullets

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