Nymra Posted December 9, 2021 Posted December 9, 2021 Ok, I tried to read the explanation on creationkit site again and again but I just cant get my head around it how this function works exactly Not the "moveto" part, but the positioning. aktor01.MoveTo(markerX, 100.0 * Math.Sin(markerX.GetAngleZ()), 100.0 * Math.Cos(markerX.GetAngleZ()), markerX.GetHeight() - 0.0, abMatchRotation = false) 1. I dont know what "match rotation" means. Does it mean it will face the same direction as the Marker? Marker faces exactly north, the aktor01 will also? (after moving). that was the easy part 2. I figured that the function AS IS places the actor01 100 units IN FRONT of markerX. But what I want to do now is also move it to the left OR right. But I have no idea how I am supposed to change the function to, for example, move the aktor 100 units in front (as is) AND 100 units to the left for example. Thx alot. Just in case you are a helpful soul: please paste full example code, I still tend to not know where all commas and * and ( go....
Guest Posted December 9, 2021 Posted December 9, 2021 1. yes. If a marker or another actor faces a direction the moved object will face exactly the same direction 2. you need a bit of trigonometry here. positionX = positionX + Sin(90 degrees + original Y angle) * distance positionY = positionY + Cos(90 degrees + original Y angle) * distance
Recommended Posts
Archived
This topic is now archived and is closed to further replies.