#How do I make my own rotator

1 messages · Page 1 of 1 (latest)

autumn niche
#

Hello,
How do I make something constantly keep rotating is there any math to it?
I just need the object it to constantly rotate on the Y axis only

simple quest
#

Just use rotator

olive atlas
#

Or animation

autumn niche
autumn niche
olive atlas
#

Apply angular force?

#

Idk

#

Maybe that’ll work

#

Never used it

autumn niche
#

nah anything with physics suck

#

math is more optimised i think

olive atlas
#

My calculate it with math, do you mean like just how fast it spins?

autumn niche
#

Just like how the vector math can make something move in smaller portions I need it for the rotation

#

This is for the position

#

it doesnt set velocity or anything it just normalizes the goal position and constantly adds it to the object

coral sundial
autumn niche
#

oh no I meant right left but still this will work for both I believe

#

imma test it rq

coral sundial
autumn niche
#

wait Im confused

#

do I add them together?

#

oh mb

#

it goes to angle

coral sundial
autumn niche
#

ehm

#

it worked but okay

coral sundial
#

ye

#

cheapest

autumn niche
#

k thx

coral sundial
#

other than not including delta time

autumn niche
#

took me 3 days lol chtgpt sucks

autumn niche
coral sundial
autumn niche
#

Is the one on event receiver true or perfect?

#

Im not sure what the difference is

coral sundial
#

When stuck on a frame showing a monster 10 meters away. Then a long time passes before next frame renders:

  • true will: have the monster on top of u before u can even see it, bc according to actual time, that's where the monster should be. unfair, & jarring/sudden when lags
  • perfect will: have the monster move the expected amount
#

@autumn niche

autumn niche
#

I see

#

nah i dont

#

but they are the same

#

they will both do the same when a frame freezes will they not? the player wont see a differens

coral sundial
autumn niche
#

so perfect delta is not using time delta in unity?

coral sundial
autumn niche
#

Ohhh

#

I get it

coral sundial
#

yee

autumn niche
#

so basically higher frames in perfect means faster rotation

#

If the speed is the same for all players

coral sundial
#

i prefer perfect, its more fair & less sudden. But typically i just use true delta for prototypes or examples bc its more convient to wire in whats already there instead spawning a new chip & entering 2 values RRtroll

coral sundial
#

when u scale by delta, that value is scaled to match what that measurment would be in that frequency

#

but completely disregards frequency & becomes based on time instead frames/frequency when u use true

autumn niche
#

Im sweating so hard trying to understand this

coral sundial
#

Hz is how many signals a second

(in a perfect world)
if you add 2 to a variable at 30Hz, by the time a second passes, 60 would have been added to that variable. if u do the same with 60 hz, there would be 120 added to that variable

autumn niche
#

and for the time based?

#

wouldnt it be the same?

coral sundial
#

if you scale whats added by "The measurement * (1/30)" (0.3...) (0.06... with the measurement 2) then when ran by the 60Hz, only 60 would be added to the variable instead 120

#

@autumn niche

autumn niche
#

OMHGG Finally I get it

coral sundial
#

yee

coral sundial
#

as u can see, true is alot more what you expect, & stable. Whereas time is very unstable. Of course the examples dont match up perfectly, but thats just the imperfections in the world

#

or i geuss 60 would have been the goal, but ye. kinda stoned atm RRtroll

#

Dont forget, if your never using a different frequency, u can just hard code "The measument * (1/ Hz)" since 1/Hz is static too

autumn niche
#

I get it but why do you use perfect more often? isnt it bad cuz if you do calculations with it, it will break if the players device cant keep up with the hz

coral sundial
#

aussuming u mean "why DONT you"

#

or u mean true

#

😭

#

stoned

autumn niche
#

Wait what

#

okay so

#

omg

#

bro i said what i said

coral sundial
#

i have lil gummy sharks rn

autumn niche
#

perfect is bad if I add 1 with a 30hz cuz if the player has 20 fps than it will only add 20

#

and thats not what anyone wants or is it?

coral sundial
#

it is, thats just wut u have to deal with

#

if u want it time based than u use true

autumn niche
#

so in this case wouldnt it be better to use true

#

yea+

#

I need it to be 30 I mean thats always the goal if you use a 30 hz to add 1

coral sundial
#

no, bc if the time between frames is long, the thing will jump to rotations instead the next amount the next time the next frame comes

autumn niche
#

you can just multiply it after

coral sundial
#

like say u pick a random frequency, u have no idea what it is, It makes the number add up to the amount you want it to, after 1 second

But then u change the frequency to one you know/desire, now the amount no longer adds up to what you wanted. So u have to scale the amount it would reach without scaling * true or perfect

autumn niche
#

okay mb I just understood it

coral sundial
autumn niche
#

okay perfect is better

#

but what about the thing I said where the players device doesnt keep up?

#

is there no fix for it?

coral sundial
coral sundial
# autumn niche is there no fix for it?

no, the constraint time is 1 second, the only way to "fix it" is by having the time be based on the frequency but that dosent makes sense bc u need a grounded metric or something

#

like, you saying i wanna measure 1 inch, but i was only able to put my ruler at 0.5 inch, lets stretch space so that 1 inch is now 0.5 inch to satify our goal

autumn niche
#

I see

#

or I could just manually give every single frame rate its own number that adds like a mad man

coral sundial
#

in our example, thats like adding, if the counter is not the expected 30, say it hit 30 anyways. So if the time was lower or higher, it would still jump & be inaccurate bc thats not what the counter was given the 1 second constraint

coral sundial
autumn niche
#

Ik the future

#

you will eat today

coral sundial
autumn niche
#

k thx ur the goat

#

gave me a whole class session thank you

coral sundial