Spawning glued objects

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

Spawning glued objects

Postby KarateBrot » Thu Nov 05, 2009 11:37 pm

How can I add a box that's glued to the background?

this code...
Code: Select all
scene.addBox({ pos := app.mousepos; glued := true })

...doesn't work. It gets spawned but not glued.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Spawning glued objects

Postby niffirg1 » Fri Nov 06, 2009 1:42 am

Code: Select all
density := +inf

That is how i always make things glued
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!

Re: Spawning glued objects

Postby standardtoaster » Fri Nov 06, 2009 1:52 am

You can use body := 0 that's the way I do it.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Spawning glued objects

Postby KarateBrot » Fri Nov 06, 2009 7:34 am

Oh yeah of course... I didn't think of density := +inf

Both codes work pretty well but I like body := 0 better because with this code it really is glued to the background.
Thanks guys!
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 2 guests