It is currently March 28th, 2024, 8:56 am

Skin "Jumps" to start place

Get help with creating, editing & fixing problems with skins
Post Reply
Adytzu04
Posts: 6
Joined: April 8th, 2014, 10:27 am

Skin "Jumps" to start place

Post by Adytzu04 »

So I'm trying to make a skin of the planets orbiting but Mercury after 3 and half turns jumps back to the starting place. Why?
Also How can I slow down the speed of a rotator?

Code: Select all

[Rainmeter]
Author=Ny'alotha
Update=33
DynamicWindowSize=1

[Variables]
;Monitor
CenterScreenX=((#WORKAREAWIDTH#)/2)
CenterScreenY=((#WORKAREAHEIGHT#)/2)

;Sun
SunW=48
SunH=48
SunX=#CenterScreenX# - (#SunW# / 2)
SunY=#CenterScreenY# - (#SunH# / 2)
SunPath=Sun48.png

;Mercury
MercuryW=48
MercuryH=48
MercuryX=#SunX# 
MercuryY=#SunY# 
MercuryPath=Mercury48.png

[MeterBackground]
Meter=Image
ImageName=background.png

;==============================================#Measures
;Axis Rotation
[MeasureRotate]
Measure=Calc
Formula=(MeasureRotate % 360) + 1
MaxValue=360

[MeasureTime]
Measure=Time

;==============================================#Meters
[MeterSun]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=#SunPath#
X=#CenterScreenX#
Y=#CenterScreenY#

OffsetX=(#SunW# / 2)
OffsetY=(#SunH# / 2)
AntiAlias=1

[MeterMercury]
Meter=Rotator
;MeasureName=MeasureTime
MeasureName=MeasureRotate
ImageName=#MercuryPath#
X=#CenterScreenX#
Y=#CenterScreenY#

OffsetX=(#MercuryW# /2 + 64)
OffsetY=(#MercuryH# /2)

StartAngle=0
RotationAngle=(Rad(360))
;6.2832

AntiAlias=1
ValueRemainder=100

[MeterString]
Meter=String
Text=#SunX#
FontColor=255,0,0
FontFace=Segoe UI
FontSize=15
AntiAlias=1
StringStyle=Bold
X=#CenterScreenX#
Attachments
Sol.rar
(14.1 KiB) Downloaded 17 times
Jackal
Posts: 1
Joined: July 16th, 2017, 5:00 am

Re: Skin "Jumps" to start place

Post by Jackal »

The rotator meter takes value of a percentage instead of 0-360 degrees.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin "Jumps" to start place

Post by balala »

Jackal wrote:The rotator meter takes value of a percentage instead of 0-360 degrees.
This is not so simple, because although the [MeasureRotate] measure returns a number between 0 and 360, its value can be used in the rotator meter, because it has set the MaxValue=360, which means that these values are working as a percentage.
The problem is caused by something else, namely by the ValueRemainder=100 option of the [MeterMercury] meter. This option tells the rotator meter that a complete rotation should be done in 100 update cycles. Due to this detail in 360 update cycles the rotator rotates a bit above three and a half times, then it jumps to 0.
The simplest fix would be to replace the ValueRemainder value with a divider of 360 (the limit of the [MeasureRotate] measure). The closest such value would be ValueRemainder=120.
Adytzu04
Posts: 6
Joined: April 8th, 2014, 10:27 am

Re: Skin "Jumps" to start place

Post by Adytzu04 »

balala wrote:The closest such value would be ValueRemainder=120.
Yaay! It works :D Thanks@ :bow:
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin "Jumps" to start place

Post by balala »

Glad to help.
Post Reply