Attraction depending on velocity
7 posts • Page 1 of 1
Attraction depending on velocity
Hi!
I'm absolutely new at scripting. I have been looking for this script, but haven't found anything about it. So, I need to make objects attraction to depend on its velocity, for example when velocity x= 10 m/s, then attraction= 20 . Attraction should also decrease, when object is slowing down.
Thank you!
I'm absolutely new at scripting. I have been looking for this script, but haven't found anything about it. So, I need to make objects attraction to depend on its velocity, for example when velocity x= 10 m/s, then attraction= 20 . Attraction should also decrease, when object is slowing down.
Thank you!
- Leib
- Posts: 3
- Joined: Fri May 06, 2011 1:48 pm
Re: Attraction depending on velocity
Velocity or speed? And what ratio of velocity to attraction?
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Attraction depending on velocity
I'm thinking of velocity, so the rotating circle would gain attraction. I think, that ratio should be 4:1 (velocity:attraction)
- Leib
- Posts: 3
- Joined: Fri May 06, 2011 1:48 pm
Re: Attraction depending on velocity
No easy way to do it. You need a speed probe and script to change attraction.
For beginning you can pick my K-Probe, fix it to geom and set attraction = {scene.my.k1speed / 4}
For beginning you can pick my K-Probe, fix it to geom and set attraction = {scene.my.k1speed / 4}
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Attraction depending on velocity
Tis is the kind of use i was thinking of with my velocity measurer 
-

bozbez - Posts: 149
- Joined: Tue Apr 12, 2011 7:01 pm
Re: Attraction depending on velocity
You're reading my mind... STOP IT!
- Leib
- Posts: 3
- Joined: Fri May 06, 2011 1:48 pm
Re: Attraction depending on velocity
I would use this code of davidz40:
on an alternating collider, then multiply the appropriate value by a constant.
- Code: Select all
textureMatrix=[e.pos(0)-textureMatrix(2), e.pos(1)-textureMatrix(3), e.pos(0), e.pos(1),(textureMatrix(0)^2+textureMatrix(1)^2)^0.5, 0.0, 0.0, 0.0, 0.0];
on an alternating collider, then multiply the appropriate value by a constant.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
7 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests




