Page 1 of 1

glue 2 Objects together oncollide?

PostPosted: Fri Oct 27, 2017 5:12 pm
by LukasHauden
is it possible to glue 2 Objects together oncollide??
i tried oncollide = (e)=>{
e.other.body = (this.body); and the other way around
e.other.glued = (true);
glued = (true)
}

Re: glue 2 Objects together oncollide?

PostPosted: Thu Dec 14, 2017 12:10 am
by LukasHauden
still no one?

Re: glue 2 Objects together oncollide?

PostPosted: Thu Dec 14, 2017 2:55 pm
by Kilinich
There is a bug in Algodoo 2.1 - you can't connect or glue anything to existing geom even if you set correct geomID/body.
So the only way is to re-create objects, it works only for simple geoms and nothing connected.
As workaround, you could set large value of adhesion in script.

Re: glue 2 Objects together oncollide?

PostPosted: Thu Dec 14, 2017 3:15 pm
by Kilinich
There are some rare cases where fixates is working - like in old Robin scene, but Undo mess it up.

Rating: rated 9
Filesize: 1.43 MB
Ratings: 50
download


Aim with mouse.
Enter - shoot.
A - switch low/high angle.