antstubell Posted November 14, 2019 Share Posted November 14, 2019 I've been toying with this idea for some time so I'll give it a go.Objective is that an object rotates + or - 90 degrees on each activation. Effectively player can completely and indefinitely rotate an object.Here's what I have so far. Float Property RotationVal AutoFloat Property SpeedVal AutoObjectReference Property TranslateRef AutoEvent OnActivate(ObjectReference akActionRef)Float CurrentPosX = TranslateRef.GetPositionX(); get position XFloat CurrentPosY = TranslateRef.GetPositionY(); get position YFloat CurrentPosZ = TranslateRef.GetPositionZ(); get position ZFloat CurrentRotY = TranslateRef.GetAngleY(); get rotate X angleFloat CurrentRotY = TranslateRef.GetAngleY(); get rotate Y angleFloat CurrentRotZ = TranslateRef.GetAngleZ(); get rotate Z angle; If condition checking on whether player chose rotate left or right; For this example, assume player chose rotate right = + 90 degrees added to RotZ valueTranslateRef.TranslateTo(PosX, PosY, PosZ, RotX, RotY, RotZ, SpeedVal, RotationVal); EndIfEndEvent The line which translates requires a bit of formula so I am guessing that - TranslateRef.TranslateTo(PosX, PosY, PosZ, RotX, RotY, RotZ + 90, SpeedVal, RotationVal)isn't correct.Another concern just popped into mind. How to tell script that +/- 359 degrees is the max. rotation and after that reset to 0 Link to comment Share on other sites More sharing options...
Recommended Posts