Scene.addFixjoint Can't find geomID
Posted: 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
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