Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (AndrewAMD, TipmyPip, NewbieZorro, Grant), 14,196 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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