#Rotating item displays around a coordinate
1 messages · Page 1 of 1 (latest)

@gilded stratus all my code does is make the iron block rotate
Why are u turning the iron block when u want to create a wheel effect???
Don’t you need to move the end rods
Oh.. have you tried anything yet
they need to rotate around iron block
umm
some guy told me to use quaternions but i have no idea what happened everything kinda broke
Weird.. I can’t help without code though 💀
loop 90 times:
add -1/100 to {_loopvalue}
if pitch of {wheelcenter} is -90:
set pitch of {wheelcenter} to 0
add 5 to pitch of {wheelcenter}
set display right rotation of {rod1} to {_loopvalue}
there
thats the rotation part
You have tried the same with the end rods right
Maybe u gotta change all numbers and do all 4 rods so -360 and change some other numbers try experimenting
Ive spent the last hour and a half experimenting
thats not helpful 😦
u just said experiment
bruh
😦 please help me
Well you gotta actually teleport those end rods aswell
Otherwise if ur just changing pitch like in that code. It will rotate around themselves
What is that
try modifying one of these functions i had laying around and learn how it works:
set display left rotation of %entity% to axisAngle(45 * (3.14 / 180), 10 * (3.14 / 180), 1, 0)
i suppose this is a cold comfort but when skript display pr releases you can use rotate {_display} around {_some vector} by 5 degrees
When does it come out
with 2.10 in january
but the nightly is available now
the plugin is called skript display?
no
the pr relating to block displays
pr = pull request
to the actual skript code
this one probably
doing gods work 🙏
I figured it out
Quaternions aren't complex by themselves. They're just hypercomplex numbers with one real component and three imaginary components. Most basic concepts of them are the same as in complex world.
What makes them difficult to understand are their applications such as rotations where the real component is used as a rotation angle and imaginary components represent the vector being the axis of rotation.
I could talk about multiplication not being commutative, but an average user won't even think of multiplying them.
They're just a neat alternative for rotation matrices.
I may have taken it a bit too far, but my point was to show that they're a great mathematical tool which can be used with ease.
i also think it's kind of silly that they're explained as having imaginary numbers
it's much easier to think of them as simple 4 dimensional vectors, like a 3d vector but with 1 more number
there's nothing really inherent to them that forces you to know about imaginary numbers
all you need to know is sin and cos
or even just use axisAngle objects constantly
Both interpretations are mathematically correct. You either interpret i, j, k as a vector space basis or imaginary units.
It's the same as in imaginary world. You can interpret complex numbers as 2D vectors or points somewhere placed on the Gauss' plane.
Even real numbers can be interpreted as one-dimensional vectors.
If you're using them only for rotations (which is their most frequent application), then yes, but keep in mind that they're an extension of complex numbers.
i realize that lol
i'm saying it's a lot harder to explain imaginary numbers than it is a 4d vector
but online and sometimes here it's always "real and imaginary parts"
and it's like that's just making it harder than it needs to be
I don't think it's easy to explain a four-dimensional vector...
it's really easy
everyone is used to 3d vectors
just tell em there's a fourth number in it
From my experience, most scripters (some plugin developers too) don't know what vectors are.
they know what locations are
But eh... let's not complain.
Are you specifically complaining about the way complex numbers and quaternions are explained or about using terms like "imaginary" when talking about rotation?
the way quaternions are introduced to people who don't have high level education in math
the vast majority of people don't know what imaginary numbers are or just know that i is the sqrt of -1
but they understand x y and z
Well, that's what happens when programmers and mathematicians meet.
exactly, which is what i'm talking about
My preferred way of teaching is first telling the boring theory and if a person or a group of people don't understand, I keep simplifying it step by step until they get a grasp of it.
Discarding a whole theory at the very beginning is a bit too much in my opinion.
which is fine if you're both invested in it
if the other party is scared off by mention of imaginary numbers and decides that they don't need to learn what a quaternion is, or that they can't, then you have a problem
Although I'm pretty sure my point of view is biased as I generally don't speak to people not familiar with math.
which is what i've encountered quite a bit here when talking about quaternions
I see. Well, as I said before, I may have taken it a bit too far, but still, it's good to talk about such things. Hearing out other people's opinions does wonders.
Actually, I wondered if I should make a PR to Skript's repository adding some matrix related operations, but I suppose I should leave it to math-focused addons.
And I guess TheOneWizard is mainly working on bringing the beauty of math to other folks out here.
No worries mate, I didn't feel targeted. It's just good to have a conversation on a decent level.
yeah skript doesn't really have the concept of a matrix or anything to use it on, really
The only application would be rotation matrices, but using them is a pain in the rear. That's exactly why quaternions come in handy.
I can totally imagine Skript users getting along with it.
lmao
Alright. Time to go to sleep. Thanks for a nice talk Sovde, I enjoyed it. Have a good night.