05-19-2019, 11:30 AM
(This post was last modified: 05-19-2019, 11:39 AM by UsernameHed.)
Hello again.
Here is a screenshot where I try to explain everythings:
When I select my "Dolly 2" object, I have some editor scripting and some stuffs.
I have an object (the camera of my game), who are in this screenshot between the CP001 and the CP002.
When I click on the button "Add Key" in the inspector, I would like to add a control Point exactly in the position of my camera object (in the screenshot: it is the "Position where to add")
Here is how I have tryed to add my point:
and you see the result, it's not at the right position, and always at the end of the spline.
So, I have only 3 information:
- the Spline
- the position of my camera (which is a SplineController, always on the SPline)
- the type of adding: here another screenshot. I know if i have to add a point at the end, inside, or at the start of the spline:
When I want to add inside the Spline: I can have the percentage of the SplineController. So I may find also the segment where I want to insert.
The weird thing is: even if i add a control point at the end of the spline, the position where the control point is created is not really at the same position:
So, it was a long post, I hope It's an easy answers, and I hope I explain well what I wanted.
Here is a screenshot where I try to explain everythings:
When I select my "Dolly 2" object, I have some editor scripting and some stuffs.
I have an object (the camera of my game), who are in this screenshot between the CP001 and the CP002.
When I click on the button "Add Key" in the inspector, I would like to add a control Point exactly in the position of my camera object (in the screenshot: it is the "Position where to add")
Here is how I have tryed to add my point:
Code:
curvySpline.Add(cameraWorldPosition);
and you see the result, it's not at the right position, and always at the end of the spline.
So, I have only 3 information:
- the Spline
- the position of my camera (which is a SplineController, always on the SPline)
- the type of adding: here another screenshot. I know if i have to add a point at the end, inside, or at the start of the spline:
When I want to add inside the Spline: I can have the percentage of the SplineController. So I may find also the segment where I want to insert.
The weird thing is: even if i add a control point at the end of the spline, the position where the control point is created is not really at the same position:
So, it was a long post, I hope It's an easy answers, and I hope I explain well what I wanted.