SHOW:
|
|
- or go back to the newest paste.
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->SplineRotInfo; //get the array of rotation data in the spline component |
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 | } |