Scene.addFixjoint Can't find geomID

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

Scene.addFixjoint Can't find geomID

Postby doodlechaos » Sun Apr 07, 2019 1:05 am

Hello! I am working on a new video for my YouTube channel and I got stuck by an issue in thyme. My project spawns so many circles that it eventually bogs down the performance of the scene. After the circles roll and collide with a specific object I would like to glue them to the background so that they aren't updating values forever after reaching their final position.

The most promising method would be to add a fixed joint to something that is already glued to the background using Scene.addFixjoint as shown below. This is what I've been trying in my "onCollide" scripting section.

"(e)=>{
Scene.addFixjoint({
geom0 := e.this.geomID;
geom1 := e.other.geomID;
geom0pos := e.this.pos;
geom1pos := e.other.pos;
size := 0.1
})
}"

Unfortunately it seems unable to find the geomID. At first I thought this was due to the position updating and it not finding a match, but after testing on unchanging positions it still can't find the correct ID.
84381016 ms: - ERROR - Couldn't find geom with ID #1628594
84381016 ms: - ERROR - Constraint connected to unknown geometry

This tetris project is potentially useful: https://github.com/tatt61880/algodoo_te ... tetris.phn
That is where I am taking the syntax for Scene.addFixjoint.

Any help would be much appreciated! Hopefully somebody in this community has a solution.

Best,
DoodleChaos
doodlechaos
 
Posts: 1
Joined: Sun Apr 07, 2019 12:54 am

Re: Scene.addFixjoint Can't find geomID

Postby FRA32 » Mon Apr 08, 2019 2:31 pm

As far as I am aware, hinges and fixJoints can only be attached to objects AS THEY SPAWN, meaning attaching them to already existing geometry is basically impossible unless you delete the original and spawn a copy. Why would you want fixjoints to something glued anyways? Doing so would have absolutely no consequence except for adding another object to be rendered.
FRA32
 
Posts: 229
Joined: Wed Dec 03, 2014 9:51 pm

Re: Scene.addFixjoint Can't find geomID

Postby Ken3344 » Tue Apr 09, 2019 3:18 am

Hey Doodlechaos, I am not sure if this is possible. Although I am not as advanced at Thyme like FRA32 is, I can say that gluing something to the scene *may* be possible with thyme, but I am not sure if it will work in your case. I was able to get an object to be glued and unglued later in thyme, but I am not sure if flipping the order of it would work. Can I see what you're trying to do? I might find a simpler solution for it. ;)
Hello my name is Kenlimepie. I'm an Algodoo Enthusiast, and Marble Racer. I run a Youtube channel which is about Algodoo Marble Racing, but I am not afraid to design new ideas in this program. https://www.youtube.com/c/kenlimepie
Ken3344
 
Posts: 53
Joined: Mon Sep 05, 2016 8:44 pm


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 3 guests