#Flying Vehicle Details
227 messages · Page 1 of 1 (latest)
Flying Vehicle Details
the idea of a flying machine. A seat, animation gizmo, a shape, a clamp, etc. why do you need all that
and like what hold what in place
@hidden dagger
which object are you trying to get to be the mother object from the clamp?
What's the right answer
Vehicle Position + (Direction * (Speed * Delta Time))
seat is because you cant rotate players on the Y or X axis, only Z (left and right). But seats can. Im geussing the shape your talking about is the steering refference for the circuits (i use trigger handle), in which animation gizmo snaps the steering object in place whenever you let go of it. And a clamp (piston v2 is less ink tho) clamps the animation to the seat.
Okay my goal is to make a boat.
I only need to rotate on Z
so how do I set it up without a seat
So no seat, just clamp animation to the ship, and with the circuits, replace anything for the seat, with ship, but use vector split n such so it dosnt go up or strafe. And Quaternion split at y,w i think, so it dosent tilt anywhere causeing the player to go off
wait so do I move the ship as an object and if so arent I supposed to use a respawn
ppl say its cheaper, i would if it dosent do all those orange squares, otherwise use set transform
well you can toggle off the orange cubes
its a bool value in the chip
yeah, but not when it first came out. either that or it just never worked when respawning players
how do I make it go forward just a little bit every frame
what do I add to it and then respawn
also its a singleplayer game and the ship will run at 60hz
After the movement vector is done, add a small vector create to it, with Z being how much extra you want to move forward
but wouldnt that just make the boat move forward z all the time?
that, or add to the Z split to the Z create, that may work too
not if you have the right system. It should already check if steering object is equipted, then run
well I want the steering object to be a wheel
but how do i keep the wheel in place
oooh wait i have an idea
I gotta try this real quick
in that case, since the steering object will move forward depending on how far or close the steering object is to the ship, which is pivot based, so maybe you should add a dynamic offset accounting for the steering objects distance from the pivot, and then add
Id suggest Pancake992's hand crank invention
that doesnt function when on a certain axis
ah, well you can always figure out how to make it multiaxis, maybe get the man here himself for help. But i do remember it being an rotator, so i thought it shoukd work with multiple axises
I have an issue
I don't know how to set rotation works with the axis on which an ink object is oriented
so like
i have a wheel
but its pivot point is all whack
You tried centering pivot right?
yeah
I just want the wheel to point towards where I let go of the handle
and stay there
i dont know how to do this it's too complicated
Ok, this is the only comback method ik, it it dont work, ur gonna have to remake it with more care next time: look into the forward direction, create a cube, and manipulate it until its like a perfect hitbox for the wheel, center its pivot, then select the cube, then wheel abd merge. If wheel sets the cubes pivot to its pivot, edit it, and center pivot to cub and then delete it. If that dobt work, from what ik, theres no saving it
but how do I know if its not like backwards or upside down
green is up, red right, blue forward
like if I set the rotation of an object to point towards something does the blue line point towards it?
yeah
alright
so I need the blue line to point from the center of the wheel to the top handle
probably depending on what ur doing tho, subtracting away probably makes it point in oppisite direction
then use up vector instead forwards, and aling the handle and up
align?
ye, vertically in line, above the pivot
green
well now do what you wanted to do, but using the up instead the forward vector
how do I set the rotation of the wheel to where I want it to
sorry that came out really inspecific
I dont know how im gonna point the wheel
wouldnt I need to like get the y and x from a vector of some sort to get a plane rotation
because the blue line is facing forward to the front of the ship too
Well wheel is gonna be seperate from the ship, so respawn it with position being the distance where it needs to be corresponding to the ships pivot, rotated by the ships rotation, and then added to the ships position. And i having done and handcrank stuff like that, thats y i suggested pancake's hancrank, but i could give like, expermental suggestions?
First off, respawning probably takes more cpu, so i would use a rotator with wired to the wheel and then the body to the chip for starters
that will keep its position instead of needing to respawn
how do I get the correct position that i need for the wheel?
and then rotator set rotation would be in there
its in my paragraph
so geussing u dont wanna use rotator?
rotator would be easier, and i would take advantage of it for the sake of efficiency
its below the paragraph, body to ship, rod to wheel
body?
the grey part
oh
okay so the rotator is held in place by the ship
and then the wheel is held by the rotator
ye, wheel held by rotator's rod
then thats where idk at all xD i can give some experimental suggestions i never tried, and cant try bc im not on, that might work, that im sure someone will correct me for or sumn, but ye
also, your using trigger handle?
uh I was thinking an invisible object ( a ribbon with 0 length)
yeah, thats fine, u said handle so i thought u meant that xD
no just the handle of the wheel that points up when the wheel isnt rotated
yee
So id configure the rotator, remove all chips, edit it, and then 30hz, if ribbon is equipted via get first with tag. Then should rotator set rotation, and degrees from 0 to the degrees of distance the ribbon is at is what we need
how do I get the degrees
I know atan2 can get the degrees from two inputs
so maybe the z and y values of the vector3 position of the handle minus the position of the wheel?
ok, so rotator get degrees, and then ribbon quaternion get axis which should output its rotation in degrees, but then im sure you could just turn your hand in place and then it would turn the wheel
that too? xD idk. try it out
well wouldnt ribbon quaternion get axis get the rotation of the invisible tube? that shouldnt be a part of it because when you grab it it rotates to any weird position
but rotator is stuck in a specific axis so it shouldnt matter for what u want, unless u try it out and it dose something undesired, besides from being able to stand there and rotate the wheele to ithe ribbons rotation instead of doing it a more desired way xD
it has to involve subtrancting tho, bc like vectors, if u subtract the right way, they'll follow eachother, so if we subtract the position of the wheel from the ribbon while taking in account for the up vector somehow, maybe that would work, but it needs to be in degrees n such/float
ye xD
when I get the atan2 of the x and z value subtracted from the split of the handle minus the wheel
it says 90
wait no its wheel minus handle
yee
wait no
hold up
handle minus wheel
yeah
okay but why does it say 90
it should be 0
yee, probaly, idk the right subtraction order but i remember someone saying "destination - (idk forgot, but just the other thing)"
so should work bc handle is destination for the wheel
u could subtract by 90 
xD
maybe it literally just needs a sub by 90 offset, my best geuess xD
aight, the there u go xD
stay with me we're getting somewhere I think
ye, and then cryptic creator is gonna come here and start dropping some cos's correcting us xD
fr
@gentle lantern looks like it works... I haven't yet tested it when the boat is rotated differently though
it works when its facing forward tho
ah, but only when facing fowards?
unsure
but if it does work...
how would I convert that rotation to a turning speed?
well gotta test it then xD
turning speed for the boat, like it will rotate the boats Z?
okay pause
it doesnt work
when the ship is backwards is spazzes
nevermind
it doesnt work unless facing forward
are you using vectors? Like what have u got so far
which is the issue
no matter how the ship is faced, it still gets the rotation among the xy axis
so if the ship is sideways then you have to move the ribbon in front of and behind the wheel to make it work
and if its backwards its the opposite of if its forwards
yeah but whats the maths in its current state
@hidden dagger How do I get a relative atan2 of a changing plane?
like the plane changes so if its facing forward you use x and y values in the atan2
but when its sideways you need y and z
rotate by inverse of boat rotation
rotate what
vector
what vector
idk
thats y i wanted u to say what the maths are
lay it out, whats subtracting n all that
like how it decides the x and y values for the atan2?
yes
it decides using the position and subtracts them
but it always uses the y and x values of the positions
hence the issue
so thats where u can rotate the vector
because it wont use the z values when it needs to in order for it to work
what is supposed to be relative to
rotate, then use the split im geusing
Okay so I have a boat, it's wheel should rotate so that the top handle is always facing the position of an invisible ribbon thats attached to an animation gizmo so it hold it in place where the wheel is currently rotated
ill take a video and put it here
https://streamable.com/4jd1nl @gentle lantern @hidden dagger
this is the issue
and i showed all the circuits
How fix
Eh, then i got nothing but boolean system, but obviously it can be done with math, so id wait for cryptic, someone else, or research it more
but when its facing backwards, maybe try absolute value on the subtracts?
@hidden dagger ideas?
Vector = Vector Rotate((Handle Position - Wheel Position),Quaternion Inverse(Wheel Rotation)
Atan2(Vector.x,Vector.y)
subtract handle position by wheel rotation
rotate the subtraction value by the inverse of the wheel rotation
plug the X and Y values into Atan2
i think
idk it was a bad demonstration
wait solution
subtract handle position by wheel position
rotate the subtraction value by the inverse of the boat rotation
plug the X and Y values into Atan2
(or X and Z idk)
this way no matter how the boat is rotated it will always be correct
you cant subtract handle position (vector3) by wheel rotation (quat)
they both either have to be quat or vector
fixed
also you cant subtract quaternions
since they are nothing like vectors
you can only multiply
okokok
got it
what chips do i use for step 2
to rotate the subtraction value by the inverse of the boat rotation
get rotation into a quat inverse chip right
but then how do i rotate the value by that
vector3 rotate?
is it the Rotate Vector chip?
@hidden dagger
yes
@hidden dagger How do you recommend converting the rotation to turn speed? And what do I do if the player turns it more than 180 degrees?
gotta make a rotation calculator
check out pancakes invention
edit n save
Is it called rotation calculator or does it go by a different name? I can't find it
look at their portfolio
whats the name of it I dont see it
I mean to be fair I don't really know what I'm looking for
@royal dagger How do you make the thing from your hand crank where it calculates your total rotation depending on how many times you've rotated it
Use the delta rotation instead of the atan2 rotation directly
Try to figure the rest out urself(makes u smarter) or google it