so yeah I need a bit of help I’ve done geometry before but I need a refresher >_<
because inverse tangent (otherwise known as atan in gk blocks) is giving me brain farts
the reason why I need this is pseudo stuff I’m using the A= atan (y divided by x)
idk if that’s right or not but I need it to give like angles the player is heading in from 1 to 360 but I’m having a dum moment today
Correct me if I’m wrong but gimkit gets the following input:
W - 0 degrees
A - 90 degrees
S - 180 degrees
D - 270 degrees
And they can be combined in the following ways:
WA - 45 degrees
AS - 135 degrees
SD - 225 degrees
DW - 315 degrees
So really there is no need for exact degrees. This is just what I know based on my experience with multiple different engines.
math checks out.
this can be easily done with some math using coordinates i believe.
Math does work out
But mobile people get 1 degree - 359 degrees
Oh great. 0-o
as well as if this were to be done in platformer. the jump angle goes a full arch, it doesn’t just go up and down at a 45 degree angle.
mobile has a joystick?
correct.
(kinda)
No
Where ever we touch
We move
So we can go any direction
oh, ah. yeah that complicates things.
Well, its only for top down
Platformer we get buttons (which i hate them, since they hold themselfss down somethimes)
Here
Yes, this is what mobile looks like
yeah i knew that ( seen images )
never seen any images for mobile top down.
never seen you before but yeah that sounds a bit right for computer but for mobile uh
idk then again nobody uses mobile cuz mobile is trash for gimkit
yum
and you say you’ve used different game engines before?
can you list some of em? i try to use some other ones other than this educational one but that ends up with me being totally lost (because i dont know code and there’s no courses for most game engines or they just dont explain a lot) if you would you can contact me wix which you can find in the search bar (we’re currently having an anniversary for an admin)
Ay, ayayayayay
Im a mobile user
And its fine
I’m harharharhar83 with a new name :D
""
Mostly gamemaker, but I’ve poked around at godot and unity
just spent 20 min trying to calculate the player’s change in X only for it to return undefined :/.
Tried this in this guide but I couldn’t do it.
Now that I think about that though, you could try converting x and y to rcos(θ) and rsin(θ) respectively, find the distance from the origin, and then solve for θ, where r is the distance from the origin. For once in my life, I will actually experiment in GKC and not just blabber theoretical nonsense.
So now I need to make sure that gimkit uses degrees (the inferior) instead of radians because I keep getting 0 and I think that might be because my number is always out of the domain. I’ll get back once I use the mod function guide by getrithekd.
Okay, so gimkit uses degrees. Ouch. If you make a property "sin(30)’ it returns 0.5. AND there’s no pi button, so I’ll use the first 10 - 15 digits instead.
Okay, arctangent works. Apparently arctangent uses radians instead of degrees, but sine uses degrees instead of radians?! Anyways, because the angle is [0, 90], the best way to do this is probably to check if the player is to the left of the “origin”, and then add 90 to it.
Nevermind. Doing Y/X is not the way to go here. I will be leaving for the time being now.
Honestly, the radians and degrees thing might be a bug.
Nice Math.
To me, this seems like a research topic waiting to happen.