Simple RPM meter
5 posts • Page 1 of 1
Simple RPM meter
Since Algodoo2 fire onCollide every step (not every frame), we can use simplified scripts for measuring:
Unsigned RPM from on collide (just make it collide for sure):
[scene]58133[/scene]
Unsigned RPM from on collide (just make it collide for sure):
- Code: Select all
scene.my.rpm = math.acos(e.normal(0) * e.this.normal(0) + e.normal(1) * e.this.normal(1)) * Sim.frequency * 9.5492966;
e.this.normal = e.normal;
[scene]58133[/scene]
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: Simple RPM meter
neat! i never thought of it by using the scalar product.
btw do you know a way to control the frequency for lasers a bit better? because it seems that it not totally constant all the time. (or is it different in algodoo 2 now?)
btw do you know a way to control the frequency for lasers a bit better? because it seems that it not totally constant all the time. (or is it different in algodoo 2 now?)

-

KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: Simple RPM meter
In 2.0 onCollide fires every step and onLaserHit/onHitByLaser every frame (usually once per 1-2 or 3 steps).
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: Simple RPM meter
Can't seem to get this to work on my scene's in algodoo - keeps jumping between figures that are less than 1 and then jumping up into the 1000's, only seems to show the right RPM once then jumps to a random figure :/

- thebeech
- Posts: 241
- Joined: Mon Aug 31, 2009 8:32 pm
- Location: Your Hardrive
Re: Simple RPM meter
Foregt it - you have readable in Algodoo2
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
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests



