glue 2 Objects together oncollide?

About advanced scenes, and the Thyme scripting language used in Algodoo.

glue 2 Objects together oncollide?

Postby LukasHauden » Fri Oct 27, 2017 5:12 pm

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)
}
LukasHauden
 
Posts: 2
Joined: Fri Oct 27, 2017 5:03 pm

Re: glue 2 Objects together oncollide?

Postby LukasHauden » Thu Dec 14, 2017 12:10 am

still no one?
LukasHauden
 
Posts: 2
Joined: Fri Oct 27, 2017 5:03 pm

Re: glue 2 Objects together oncollide?

Postby Kilinich » Thu Dec 14, 2017 2:55 pm

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.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: glue 2 Objects together oncollide?

Postby Kilinich » Thu Dec 14, 2017 3:15 pm

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: 49
download


Aim with mouse.
Enter - shoot.
A - switch low/high angle.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron