Browse Search Popular Register Upload Rules User list Login:
Search:
Realistic Black hole

Image:
screenshot of the scene

Author: AveragePerson

Group: Default

Filesize: 107.97 kB

Date added: 2017-09-17

Rating: 5

Downloads: 461

Views: 96

Comments: 4

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

This is my first proper scene, the script used to apply the speed limit is:

For Y axis:
(Change "X" to the desired speed)

postStep = (e)=>{
vel(1) < -X ? {
vel = [vel(0), -X]
} : {
vel(1) > X ? {
vel = [vel(0), X]
} : {}
}
}
For X axis:
(Change "X" to the desired speed)

postStep = (e)=>{
vel(0) < -X ? {
vel = [-X, vel(1)]
} : {
vel(0) > X ? {
vel = [X, vel(1)]
} : {}
}
}

To use it correctly, make a copy of the object you are using, then give one the first code, and the other the second code, then glue them on top of each other and you're done! Have fun! :)
Please log in to rate this scene
edit
Similar scenes
Title: Realistic Black hole
Rating: 5
Filesize: 22.8 kB
Downloads: 821
Comments: 0
Ratings: 1
Date added: 2017/10/24 11:33:37
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Black hole feeding on White hole
Rating: 5
Filesize: 375.35 kB
Downloads: 2050
Comments: 2
Ratings: 1
Date added: 2021/08/16 07:54:22
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: black hole
Rating: 5
Filesize: 167.68 kB
Downloads: 458
Comments: 0
Ratings: 1
Date added: 2011/06/23 17:17:54
Made with: Algodoo before v1.8.5
Rating: rated 5
download
Title: Black hole growth
Rating: 5
Filesize: 0.74 MB
Downloads: 2554
Comments: 1
Ratings: 1
Date added: 2023/08/23 12:07:49
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Black hole
Rating: 5
Filesize: 241.74 kB
Downloads: 990
Comments: 2
Ratings: 1
Date added: 2013/03/11 07:26:45
Made with: Algodoo v2.0.1
Rating: rated 5
download
Title: black hole glich
Rating: 5
Filesize: 179.14 kB
Downloads: 1179
Comments: 0
Ratings: 1
Date added: 2022/05/19 22:13:32
Made with: Algodoo v2.1.0
Rating: rated 5
download
AveragePerson - I'm glad that I was able to teach you how to script velocities. Now you have a new tool that you can use in many other scenes! :tup:
Very nice! I like how the diffirent "areas" of attraction work.
v := math.vec.len(vel);
v > 50.0 ? {
vel = 50.0 * vel / v
} : {}
Last edited at 2017/11/24 23:47:02 by s_noonan
Thanks, s_noonan! I have a similar script in my "little black book of Thyme programming tips and tricks" but I forgot about it when I showed user AveragePerson how to limit velocity to a preset value. We can do some amazing things when we put our heads together! :*)