force scripting
1 post • Page 1 of 1
force scripting
the circle rotates around the center of mass and moves to the right (i think that this is called rolling). Is it possible for the force to stay pinned at the relpoint(1) while follows the circle at the x-axis?
here's a video with what i want.
https://streamable.com/9fc02z
But this is not a desirable way. two circles(one rotates and one moves to the right), two thrusters (the one that rotates is invisible), 2 layers
i had some ideas, but no luck.
1.update at the thruster:
2. at the thruster:
timetolive := 0.016666668
and ondie:
3. at thruster again timetolive := 0.016666668
and in poststep:
ps: the first seems better
here's a video with what i want.
https://streamable.com/9fc02z
But this is not a desirable way. two circles(one rotates and one moves to the right), two thrusters (the one that rotates is invisible), 2 layers
i had some ideas, but no luck.
1.update at the thruster:
- Code: Select all
rp = (readable(entity)).relpoint;
pos = [scene.my.circle.pos(0) , rp(1)]
2. at the thruster:
timetolive := 0.016666668
and ondie:
- Code: Select all
timeToLive = 0.016666668;
Scene.cloneEntityTo(e.this, Pos)
3. at thruster again timetolive := 0.016666668
and in poststep:
- Code: Select all
scene.my.xfor(0, 50, Scene.addThruster {
geom := -1;
pos := [-0.24451852, 0.50514579];
followGeometry := true;
opaqueBorders := true;
rotation := 0.00000000;
force := 3.0000000;
size := 0.25000000;
colorHSVA := [135, 0.00000000, 1.0000000, 1.0000000];
onKey := (e)=>{};
update := (e)=>{};
postStep := (e)=>{};
timeToLive := 0.016666668;
entityID := 4871;
resources := [];
color := [1.0000000, 1.0000000, 1.0000000, 1.0000000];
onSpawn := (e)=>{};
zDepth := 6.0000000;
onDie := (e)=>{};
onClick := (e)=>{};
layer := 0
})
ps: the first seems better
give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime
-
chris1983 - Posts: 6
- Joined: Thu Oct 04, 2018 7:51 am
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest