Box collider determines a proper size for the collider.

Closed

BUMP!!!

I don’t understand what want, sorry. I realize English is probably not your native language, but try to make a simpler, more direct question.

made clearer,now i have you can understand me.

It looks like you’re going to have to make the line endpoint be positioned forward based on the box collider object’s local Z scale. You would also want to account for rotation too.

lineRenderer.SetPosition(1, transform.TransformPoint(boxCollider.transform.localScale.z));

Completely untested but hopefully you get the idea. It should make the line endpoint be positioned at the end of the box collider.

Please,Please show me example script,i dont know how to make this,i will never do this myself,PLEASE MAN.

Have you considered using playmaker to make your game? it is quite useful for people without any programming knowledge to create games in unity. There also others such as antares universe and uscript :slight_smile:

ps. I still haven’t a clue what you need.

I need Box collider is same length as line renderer.

Anyone,PLEASE?

I think you start learning the basics of coding. What you are wanting is a simple task but making a whole script for you is not what I intended on doing when I answered your question. If you wanted an entire script you should’ve made it clear. You already understand what you want to happen, learn how to make it happen. That’s the whole fun in making games. Don’t look for others to do it for you.

I just wana script sample,PLEASE dude ,i cant do it myself,i tried this already and its been almost damn month,PLEASE I WILL NEVER DO THIS MYSELF PLEASE PEOPLE HELP MEEEE!!!

Then learn to code mate cos my help for the likes of you is done.

I send you pm.

I gave you a script “sample”. It’s not a whole script, but something you can put into a script. If you aren’t willing to take what is given to you then stop asking.

And where is that “sample”?

It seems your previous threads are asking the same exact question but you have no idea how to actually use the information that’s given to you. I’m sorry, reality has failed and I cannot help you any further.