C
C#16mo ago
.fegan

❔ Help with unity line render

OK OK so i have an issue i made myself a grappling hook and well the line renderer isnt appearing or spawning yk
33 Replies
Buddy
Buddy16mo ago
Please use $paste
MODiX
MODiX16mo ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
Buddy
Buddy16mo ago
Easier to see code
.fegan
.fegan16mo ago
BlazeBin - chvbbswgcrml
A tool for sharing your source code with the world!
.fegan
.fegan16mo ago
does that help??
RubyNovaDev
RubyNovaDev16mo ago
What is the exact issue you're seeing? are you getting an exception/
.fegan
.fegan16mo ago
there is no like issues its js not appearing when im grappling onto an object
RubyNovaDev
RubyNovaDev16mo ago
I see hmm Ok
.fegan
.fegan16mo ago
its not rlly spawning either
RubyNovaDev
RubyNovaDev16mo ago
have you confirmed that DrawRope is getting past the early return?
.fegan
.fegan16mo ago
no how lmao im new to this ngl
RubyNovaDev
RubyNovaDev16mo ago
assuming you're using Visual Studio 2022, there is a debugger built in you can set a breakpoint and just have a look
.fegan
.fegan16mo ago
how do i set a breakpoint?
RubyNovaDev
RubyNovaDev16mo ago
Use breakpoints in the debugger - Visual Studio (Windows)
Learn about breakpoints, one of the most important debugging techniques. The article covers breakpoint actions, tracepoints, conditions, and much more.
RubyNovaDev
RubyNovaDev16mo ago
this can explain it better than I can, methinks 🙂
.fegan
.fegan16mo ago
where do i put the break point??
RubyNovaDev
RubyNovaDev16mo ago
where you want the code to pause so, on the if statement with the early return I'd imagine or maybe after if its being invoked every frame
.fegan
.fegan16mo ago
here
.fegan
.fegan16mo ago
.fegan
.fegan16mo ago
?? im getting this now
.fegan
.fegan16mo ago
RubyNovaDev
RubyNovaDev16mo ago
ah the index is out of bounds the game will stop working as you expect once an exception is thrown
.fegan
.fegan16mo ago
what u mean
RubyNovaDev
RubyNovaDev16mo ago
C# angy when you play the game because you're doing something it can't recover from basically
.fegan
.fegan16mo ago
so how do i fix that?
RubyNovaDev
RubyNovaDev16mo ago
does the line renderer not have a way to just add a position as opposed to setting one? alternatively you can just set indices 0 and 1 to be Vector3.zero
.fegan
.fegan16mo ago
where?
.fegan
.fegan16mo ago
.fegan
.fegan16mo ago
it does
RubyNovaDev
RubyNovaDev16mo ago
ehhhhm at this point I would need to basically have the project in front of me and debug it myself I think which I uh well don't really have time to be doing, understandably
.fegan
.fegan16mo ago
all good ill try figure it out myself
RubyNovaDev
RubyNovaDev16mo ago
my advice is basically just inspect via the debugger see what you can find out what's up
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.