Scene.addFixjoint Can't find geomID
3 posts • Page 1 of 1
Scene.addFixjoint Can't find geomID
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
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
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
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
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests