C
C#3y 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
Buddy3y ago
Please use $paste
MODiX
MODiX3y 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
Buddy3y ago
Easier to see code
.fegan
.feganOP3y ago
BlazeBin - chvbbswgcrml
A tool for sharing your source code with the world!
.fegan
.feganOP3y ago
does that help??
RubyNovaDev
RubyNovaDev3y ago
What is the exact issue you're seeing? are you getting an exception/
.fegan
.feganOP3y ago
there is no like issues its js not appearing when im grappling onto an object
RubyNovaDev
RubyNovaDev3y ago
I see hmm Ok
.fegan
.feganOP3y ago
its not rlly spawning either
RubyNovaDev
RubyNovaDev3y ago
have you confirmed that DrawRope is getting past the early return?
.fegan
.feganOP3y ago
no how lmao im new to this ngl
RubyNovaDev
RubyNovaDev3y 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
.feganOP3y ago
how do i set a breakpoint?
RubyNovaDev
RubyNovaDev3y 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
RubyNovaDev3y ago
this can explain it better than I can, methinks 🙂
.fegan
.feganOP3y ago
where do i put the break point??
RubyNovaDev
RubyNovaDev3y 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
.feganOP3y ago
here
.fegan
.feganOP3y ago
.fegan
.feganOP3y ago
?? im getting this now
.fegan
.feganOP3y ago
RubyNovaDev
RubyNovaDev3y ago
ah the index is out of bounds the game will stop working as you expect once an exception is thrown
.fegan
.feganOP3y ago
what u mean
RubyNovaDev
RubyNovaDev3y ago
C# angy when you play the game because you're doing something it can't recover from basically
.fegan
.feganOP3y ago
so how do i fix that?
RubyNovaDev
RubyNovaDev3y 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
.feganOP3y ago
where?
.fegan
.feganOP3y ago
.fegan
.feganOP3y ago
it does
RubyNovaDev
RubyNovaDev3y 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
.feganOP3y ago
all good ill try figure it out myself
RubyNovaDev
RubyNovaDev3y ago
my advice is basically just inspect via the debugger see what you can find out what's up
Accord
Accord3y 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.

Did you find this page helpful?