Gamestudio Links
Zorro Links
Newest Posts
Tradestation missing in table of contents
by AndrewAMD. 10/23/26 14:35
ZorroGPT
by TipmyPip. 10/23/26 09:08
No connection to MT4
by JeyKey II. 10/22/26 15:33
Zorro tutorial ideas?
by mistery. 10/21/26 05:28
Avoid "log\ - delete old files" message
by Martin_HH. 10/20/26 07:23
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (JeyKey II, TipmyPip, Samed), 11,556 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 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