Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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