Spawning hinges nightmare
11 posts • Page 1 of 1
Spawning hinges nightmare
So i'm trying to spawn hinges and having a nightmare trying.
Tried just using scene.addHinge and giving a location, a zdepth and a size, but that didnt work. then i assume i need both geometry ID's
however whatever i do, i cant get GeomID from anything. scene.my.wheel1 = E.geom.GeomID, scene.my.wheel1 = E.other.GeomID, neither have worked... ive also tried using entityID but that doesnt pick up either.
any ideas what i should be doing here?
Tried just using scene.addHinge and giving a location, a zdepth and a size, but that didnt work. then i assume i need both geometry ID's
however whatever i do, i cant get GeomID from anything. scene.my.wheel1 = E.geom.GeomID, scene.my.wheel1 = E.other.GeomID, neither have worked... ive also tried using entityID but that doesnt pick up either.
any ideas what i should be doing here?
-
Torpedo - Posts: 120
- Joined: Mon Aug 31, 2009 8:51 pm
Re: Spawning hinges nightmare
You could set a local variable when you spawn the object, that sets controllerAcc to the geomID, this is a temporary work around, you can toy around with it till you get it right. .
- gradyfitz
- Posts: 174
- Joined: Tue Sep 01, 2009 8:33 am
- Location: Victoria, Australia
Re: Spawning hinges nightmare
Actually, as far as I know, spawning hinges or fixates wherever you want is impossible. To test it out create a hinge, select it, press control-c. Now go to this websity and paste it in the top box and click remove line breaks. Now go back to phun/Algodoo press ~ or F11 and press control-v, now hit return. As you can see it will not spawn it in same place as the other.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Spawning hinges nightmare
It is true, you can't spawn hinges onto existing geometrys.
However, if the geometry is spawned with a user set variable like globalID, you then can create hinges connecting to it.
However, if the geometry is spawned with a user set variable like globalID, you then can create hinges connecting to it.
-
Versieon - Posts: 375
- Joined: Tue Sep 01, 2009 4:45 pm
Re: Spawning hinges nightmare
Versieon wrote:It is true, you can't spawn hinges onto existing geometrys.
However, if the geometry is spawned with a user set variable like globalID, you then can create hinges connecting to it.
what is a geom ID?
**/\ /\
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
-
algadoodle123 - Posts: 66
- Joined: Tue Sep 08, 2009 6:04 pm
Re: Spawning hinges nightmare
It is a unique variable that diferentiates objects in phun/algodoo.
if you set this when you spawn something, you can connect fixates or hinges to it through on collide.
if you set this when you spawn something, you can connect fixates or hinges to it through on collide.
-
Versieon - Posts: 375
- Joined: Tue Sep 01, 2009 4:45 pm
Re: Spawning hinges nightmare
how would I use it
**/\ /\
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
-
algadoodle123 - Posts: 66
- Joined: Tue Sep 08, 2009 6:04 pm
Re: Spawning hinges nightmare
Here is an auto fixate i made a while back, it shows how to use and implement GeomID
Author: Versieon
Title: Fixate for Teleport
Author: Versieon
Title: Fixate for Teleport
Last edited by Versieon on Fri Sep 18, 2009 11:57 pm, edited 1 time in total.
-
Versieon - Posts: 375
- Joined: Tue Sep 01, 2009 4:45 pm
Re: Spawning hinges nightmare
you forgot to add the link
**/\ /\
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
-
algadoodle123 - Posts: 66
- Joined: Tue Sep 08, 2009 6:04 pm
Re: Spawning hinges nightmare
thank you
edit: if you copy and past a hinge into text editor, it has the IDs of the object it was on
edit: if you copy and past a hinge into text editor, it has the IDs of the object it was on
**/\ /\
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
-
algadoodle123 - Posts: 66
- Joined: Tue Sep 08, 2009 6:04 pm
11 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 14 guests