I have a prop that’s attached to another prop that is being moved via sequencer. I need to rotate the child prop when a button is pressed. How would I accomplish this? Since I have to input the translation into the MoveTo() function, it causes bugs because the translation would never keep up with the parent object.
Here is my button InteractedWithEvent code.
LowerTeam1Lance(Agent : agent):void=
block:
Print("Team 1 Lowering Lance")
#GET THE CURRENT ROTATION OF THE LANCE
#Setup Basic Transform Information
Team1LanceTransform := Team1Lance.GetTransform()
Team1LanceRotation := Team1LanceTransform.Rotation
#ROTATE THE LANCE INTO ATTACK POSITION OVER TIME
var Yaw : float = -20.0
var Pitch : float = 0.0
var Roll : float = 90.0
NewLanceRotation : rotation = MakeRotationFromYawPitchRollDegrees(Yaw, Pitch, Roll)
spawn:
Team1Lance.MoveTo(Team1LanceTransform.Translation, NewLanceRotation, 1.5)
#ROTATE THE LANCE BACK INTO THE INITIAL POSITION