Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, degenerate_762), 1,213 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: How to measure rpm of an object? [Re: MasterQ32] #351222
12/22/10 21:07
12/22/10 21:07
Joined: Sep 2010
Posts: 82
P
peteredlin Offline OP
Junior Member
peteredlin  Offline OP
Junior Member
P

Joined: Sep 2010
Posts: 82
I use the physic engine.

Now i got it fixed...

I get the number of rotations (total)

Now i got to calculate the rpm of that.

Last edited by peteredlin; 12/22/10 21:09.
Re: How to measure rpm of an object? [Re: peteredlin] #351223
12/22/10 21:09
12/22/10 21:09
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: peteredlin
How can i easy check if the value jumps from '-' to '+' ?

Pretty easy, just check if the most significant bit changed. If it did, the value switched from positive to negative or vice versa.


Quote:
did you create the code yourself or do you use the physic engine?

This really doesn't matter as the physics engine changes the same parameters as eg. c_move would do (well, in this case it would be more c_rotate).



To solve ops problem: Just measure how long one rotation took in seconds and milliseconds (stored as floating point). When calculating the rpm, you can simply do this:
Code:
var rpm = 1.0/timeForRotation;




Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: How to measure rpm of an object? [Re: WretchedSid] #351226
12/22/10 21:23
12/22/10 21:23
Joined: Sep 2010
Posts: 82
P
peteredlin Offline OP
Junior Member
peteredlin  Offline OP
Junior Member
P

Joined: Sep 2010
Posts: 82
I now got the time for one rotation

Page 2 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1