Advertisement
Guest User

Untitled

a guest
Sep 5th, 2016
3,407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "TropicalManipulation.h"
  2. #include "spline_extensions.h"
  3. #include <cstdlib>
  4.  
  5. void Uspline_extensions::set_rotation_at_spline_point(USplineComponent* target, const int32 point_index, const FRotator rotation) //exactly the same as in .h but without 'static' and with Uspline_extensions:: in front of the function name
  6. {
  7.     FInterpCurveQuat& SplineRotInfo = target->GetSplinePointsRotation(); //get the array of rotation data in the spline component
  8.  
  9.     FInterpCurvePoint<FQuat>& EditedRotPoint = SplineRotInfo.Points[point_index]; //get the point to edit
  10.  
  11.     FQuat NewRot = rotation.Quaternion(); //convert the given rotation into a quaternion
  12.  
  13.     EditedRotPoint.OutVal = NewRot; //set the new rotation of the selected point
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement