I am currently a fresh newbie to programming. Took c++ and Java classes. So I jumped into unity. Im currently making a creeper world clone for learning practices, and I was wondering if my approach was right.
So far I dynamically create game objects (nodes) using Instantiate, and then I use LineRenderer to draw the lines between the nodes. I’m trying to get an on-overlap trigger to dynamically draw lines between different gameobjects (nodes). What I am wondering is if this is a correct way to approach this. My plan is to then use the line renderers to send a sprite down them and then when that sprite triggers on a node it adds energy or continues on its way.
Thank you I’m really new so sorry for asking dumb questions XD
I haven’t done much with line rendering, but that sounds good. You probably won’t be able to use the line as a path to follow, but that’s OK, because the same logic you use to draw the line will be the way you move the object. You’ll need a script for collision detection to determine if the sprite destroys or continues on the path. Probably the toughest part will be keeping a list of which assets need energy and which don’t, and how to rotate the energy between them.
Thank you! Yea I havn’t gotten that far yet. I’m trying a few things for the “line render” path. Mostly using the line render to get the “path angle” if that makes sense. linerend has the 2 points I need. so using that to asses (for each node) which is the closest or farthest. As for energy. I think it would just send a message to the main “energy giving” node. and add that “message” to an array. then when it sends the energy the message is “confirmed” and removed. But mostly I’m just trying to make sure I can go that far with the system I am making now XD
Looking into the Spline Controller now Thank you~!