nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

`Cable` chaos when attached to a picked pickable #959

Open Timmy-the-nobody opened 1 year ago

Timmy-the-nobody commented 1 year ago

Prerequisites

Your Environment

Description

When attaching a cable between a picked pickable and a prop the prop will become crazy and teleport in a random position (near the center of the map I think)

Steps to reproduce the behavior

1: Run the snippet bellow with sandbox gamemode (and make sure at least 1 prop is spawned) 2: Pickup any sandbox tool to create a constraint between the tool muzzle and the first prop found 3: Contemplate the chaos

ToolGun.Subscribe("PickUp", function(self, eChar)
    for _, eProp in ipairs(Prop.GetAll()) do
        local eConstraint = Cable(eProp:GetLocation(), true)
        eConstraint:SetLinearLimits(ConstraintMotion.Locked, ConstraintMotion.Locked, ConstraintMotion.Locked)
        eConstraint:SetAngularLimits(ConstraintMotion.Locked, ConstraintMotion.Locked, ConstraintMotion.Locked)

        eConstraint:AttachStartTo(self, Vector(), "muzzle")
        eConstraint:AttachEndTo(eProp)
        break
    end
end)

Expected behavior

It should be constrained the same way as if the attach start actor wasn't a pickable

Actual behavior

C H A O S

chaos

gtnardy commented 1 year ago

image