Browse Search Popular Register Upload Rules User list Login:
Laser counter no collision

screenshot of the scene

Author: matto

Group: Default

Filesize: 494.87 kB

Date added: 2020-05-09

Rating: 6.1

Downloads: 1867

Views: 187

Comments: 4

Ratings: 3

Times favored: 0

Made with: Algodoo v2.1.3


Scene tag

Want to see the construction of this scene?
Watch the video!!
Thank you!

Do you want to see more?
Many other videos?
Check out this playlist !!!

Last edited at 2020/05/10 01:00:11 by matto
Please log in to rate this scene
Similar scenes
Title: Fixed Counter
Rating: 5
Filesize: 14.92 kB
Downloads: 719
Comments: 0
Ratings: 1
Date added: 2009/07/30 23:59:50
Made with: Phun
Rating: rated 5
Title: Ravenplucker's Laser
Rating: 5
Filesize: 44.97 kB
Downloads: 62
Comments: 1
Ratings: 1
Date added: 2016/07/30 04:03:00
Made with: Algodoo v2.1.0
Rating: rated 5
Title: Laser counter with 1 laser
Rating: 5.625
Filesize: 418.65 kB
Downloads: 429
Comments: 6
Ratings: 2
Date added: 2020/05/12 13:27:00
Made with: Algodoo v2.1.3
Rating: rated 5.6
Title: Laser Collision Engine Unit [1 Cylinder]
Rating: 6.8334
Filesize: 0.67 MB
Downloads: 2164
Comments: 11
Ratings: 6
Date added: 2011/03/29 06:23:25
Made with: Algodoo before v1.8.5
Rating: rated 6.8
Title: My first fuel prototype - works with phun too
Rating: 5.5
Filesize: 0.72 MB
Downloads: 542
Comments: 1
Ratings: 2
Date added: 2010/01/23 13:14:57
Made with: Algodoo before v1.8.5
Rating: rated 5.5
Title: Laser Sensor Missile - Proto
Rating: 5
Filesize: 71.49 kB
Downloads: 903
Comments: 0
Ratings: 2
Date added: 2009/09/01 14:09:13
Made with: Algodoo before v1.8.5
Rating: rated 5
Nice work. I tried counting with one laser by remembering the last entityID hit and only increment the hit count if there is a new entity. That failed when two balls rolling by were touching each other. I then tried only counting if the other entityID did not match either of the last two entities hit. This didn't work about 1% of the time and would never work if there were only two balls. I then tried putting in a delay between hit checks and that didn't work. So I like your approach a can't think of any better way. The only suggestion I would make is to put the laser counter and the collision counter on the same slide and put the counter displays side by side.
I'm glad you like it.
I hope I was helpful!!
Nice advice, I changed the scene, so it's better!
1. Put all the balls to the left of both counters at the start.
2. Set maxRays = 1 for both lasers (or else you may get ~1% counting errors).

The following code worked for me with just one laser:
_eID := 0;
onLaserHit := (e)=>{
eID := e.geom.entityID;
eID != _eID ? {
my.scene.hits2 = my.scene.hits2 + 1;
_eID = eID
} : {}
maxRays := 1;
Nice scene! :tup: