Sorry for the poorly worded question. I have a model myShip, it is located at coordinates posX, posY. I need to move it to newX, newY. This path in along the arc of a circle whose radius is still unknown at the moment. but I do know that from the center point it will travel along that arc 45 deg to its new position. I then plan to rotate the model 45 deg to be in line with its new position. However, all the resources I have been able to find to calculate this involve knowing the coordinates of the center of that circle and I can not seem to find it but I know I am getting close. Originally I have been trying to move it sideways X distance and then forward Y distance but I am having trouble getting it to land where I want as the models starting rotation can vary.
I have got it to move sideways the correct distance, and move forward the correct distance and even rotate the correct way. all regardless of myShips starting angel.y however when I try to get it all to work together it kind of falls apart as if angle.y=math.rad(45) lands in a different spot relative to its starting pos then if it was angle.y=math.rad(15). So that tells me I am on the right idea but again am having an issue with the syntax of how LUA needs the information.
I know this method should work but it is almost if TTS is trying to do it all at once. Or at least add the rotation before finishing the move. I will try to add a wait command and see if that fix's the issue.
like I said I will try adding a short wait command and see if it gets it to trigger properly. Each part works correctly individually but once combined they go all haywire.
--the distance's I don't know at the moment but hopefully, all I need to do is adjust these till the model lands in the right spot.
local forward = ?
local side = ?
local pos = myShip.getPosition()
local angle = myShip.getRotation()
local forX= math.sin(math.rad(angle.y))*forward
local forZ= math.cos(math.rad(angle.y))*forward
local sideX= math.sin(math.rad(angle.y))*side
local sideZ= math.cos(math.rad(angle.y))*side
--first I will move it to the side, and this will always move it to the right side, as I am wanting
--next, I need to move it forward relative to the angle it is facing, like with the moveY
and now that the model has to be moved to its correct place I need to rotate it