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
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
  How could I get position in spline from "From" value in BuildRasterizedPath? Chanon 1 8 02-12-2024, 09:54 PM
Last Post: _Aka_
  Finding relative position across connected splines DekoGames 1 8 02-05-2024, 10:11 PM
Last Post: _Aka_

Forum Jump: