Is it possible to add collider in render line?


#1

i am using line render between two nodes , these are drag-able. Now i want add collider in line render. how i do this? thank you!
draw line code link:https://playcanvas.com/editor/code/615325?tabs=19735605


#2

It’s kind of doable. Unfortunately you can’t scale physics objects in Ammo once they’ve been created. Therefore, you have to remove and re-add the collider every time you change the length of the line.

You can create the collider directly through Ammo or create an entity purely for the collider component and position/rotate/size it correctly.