Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about the local position
#3
Thanks for your reply, the missing script is not the script to add the control point , the adding controll point is controlled by another script,
for example:
float x=-104.008, y=7.14151 ;
vector3 vec3;
CurvySpline curvySpline;
GameObject MapLines = DarkTonic.CoreGameKit.PoolBoss.Spawn("NewMapline", parent.transform.position, parent.transform.rotation, this.transform).gameObject;

MapLines.transform.localPosition = parent.transform.localPosition;

MapLines.transform.localRotation = parent.transform.localRotation;



CurvySpline curvySpline = MapLines.transform.Find("Input Spline Path/Input Spline Path_1_Spline").gameObject.GetComponent<CurvySpline>();
curvySpline.Clear();


int c = newMapLine.GstPoint.Count;
for (int j = 0; j < c; ++j)
{


vec3.Set(x, roadlineHeight, y);
curvySpline.Add(vec3);
}
Reply


Messages In This Thread
question about the local position - by brucezhu99 - 09-17-2021, 10:25 AM
RE: question about the local position - by _Aka_ - 09-17-2021, 10:59 AM
RE: question about the local position - by brucezhu99 - 09-17-2021, 11:18 AM
RE: question about the local position - by _Aka_ - 09-18-2021, 10:54 AM
RE: question about the local position - by _Aka_ - 09-18-2021, 12:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to get the position of each ControlPoint in spline by API? Chanon 1 2,133 06-07-2025, 09:44 AM
Last Post: _Aka_
  Question about Timeline support GhuaGhua 3 2,227 05-21-2024, 01:33 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 1,777 03-28-2024, 10:08 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 4,578 02-24-2024, 10:43 AM
Last Post: _Aka_

Forum Jump: