2.0.2b15 radius and size is now scriptable!
7 posts • Page 1 of 1
2.0.2b15 radius and size is now scriptable!
Circle's radius and box's size is now scriptable.
Thanks, emilk for the feature.
It's very interesting. This can be used for gaming purpose.
Example:
This scene is created by next code.
NOTE: This code requires Algodoo 2.0.2 b15.
I used Sim.time above, but it's not good to use it because reopening scene reset Sim.time into 0, even if Sim.time wasn't 0 when you saved the scene.
Thanks, emilk for the feature.
It's very interesting. This can be used for gaming purpose.
Example:
This scene is created by next code.
NOTE: This code requires Algodoo 2.0.2 b15.
- Code: Select all
Sim.running = false;
Scene.Clear;
Scene.addCircle {
radius := {1 + 0.25 * math.sin(Sim.time)};
pos := [-1, 0];
color := [1, 0, 0, 1];
restitution := 0.0;
};
Scene.addBox {
size := {[1, 1] + 0.25 * [math.cos(Sim.time), math.sin(Sim.time)]};
pos := [1, 0];
color := [0, 0, 1, 1];
};
Scene.addPlane {
angle := math.pi / 2;
pos := [0, -1];
color = [0, 0, 0, 1];
};
Scene.addPlane {
angle := {math.pi / 2 + 0.1 * math.sin(Sim.time)};
pos := [0, -1.5];
color := [0, 0.5, 0, 1];
};
I used Sim.time above, but it's not good to use it because reopening scene reset Sim.time into 0, even if Sim.time wasn't 0 when you saved the scene.
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
-

tatt61880 - [Most Helpful Person 2010]
- Posts: 1150
- Joined: Mon Aug 31, 2009 5:45 pm
- Location: Tokyo, Japan
Re: 2.0.2b15 radius and size is now scriptable!
you can also modify everything directly in the script menu, this is one of the best things that happened to algodoo =)
Basically, there are only 10 types of people in the world. Those who know binary, and those who don't.
Light travels faster than sound. That's why some people appear bright until they open their mouths.
Light travels faster than sound. That's why some people appear bright until they open their mouths.
-

monstertje3 - Posts: 343
- Joined: Sat Sep 05, 2009 4:29 pm
- Location: N-H, NL
Re: 2.0.2b15 radius and size is now scriptable!
hey, i have a question about that...
why do the rotation axis stay in point and dont move with the blocks when i press "A" and "S" the left goes up an down but the tires stay in position. the same is on the right side (steer with "D" and "F")
hope you know what i mean. if not... ask again ^^
best regards bluebravo aka silversmart
best regards bluebravo / silversmart
why do the rotation axis stay in point and dont move with the blocks when i press "A" and "S" the left goes up an down but the tires stay in position. the same is on the right side (steer with "D" and "F")
hope you know what i mean. if not... ask again ^^
best regards bluebravo aka silversmart
best regards bluebravo / silversmart
- silversmart
- Posts: 27
- Joined: Tue Jul 05, 2011 7:48 pm
Re: 2.0.2b15 radius and size is now scriptable!
the axles and fixjoints have a specific snap point on the object
the middle of the object is taken and then the relpoint gets added and defines its place.
if you resize the box the relpoints of the axles don't change and keep the same distance to the center of the object.
(resizing hapens from the center outwards)
the middle of the object is taken and then the relpoint gets added and defines its place.
if you resize the box the relpoints of the axles don't change and keep the same distance to the center of the object.
(resizing hapens from the center outwards)
Basically, there are only 10 types of people in the world. Those who know binary, and those who don't.
Light travels faster than sound. That's why some people appear bright until they open their mouths.
Light travels faster than sound. That's why some people appear bright until they open their mouths.
-

monstertje3 - Posts: 343
- Joined: Sat Sep 05, 2009 4:29 pm
- Location: N-H, NL
Re: 2.0.2b15 radius and size is now scriptable!
but if we could change the "geom1pos" of the axles this schould work.
but i think its not possible or is it?
best regards
but i think its not possible or is it?
best regards
- silversmart
- Posts: 27
- Joined: Tue Jul 05, 2011 7:48 pm
Re: 2.0.2b15 radius and size is now scriptable!
silversmart wrote:but if we could change the "geom1pos" of the axles this schould work.
but i think its not possible or is it?
best regards
It's not possible to script geom0pos, geom1pos with Algodoo 2.0.2 b15.
I may found a good way to solve this issue.
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
-

tatt61880 - [Most Helpful Person 2010]
- Posts: 1150
- Joined: Mon Aug 31, 2009 5:45 pm
- Location: Tokyo, Japan
Re: 2.0.2b15 radius and size is now scriptable!
here is my final scene.
hope you like it
hope you like it
- silversmart
- Posts: 27
- Joined: Tue Jul 05, 2011 7:48 pm
7 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest




