Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input Spline Shape @ Runtime
#1
How do I assign an InputSplineShape at runtime?  I want to have a road that contains 2 lines with a yellow line running down the middle.  Now I want to expand it to a divided highway.  To do this, I need to change the shape and the texture.  How do I assign/reassign the shape, because this doesn't work as I expected it to.  Do I need to use a method instead?  if so what?

                        InputSplineShape SHAPE = GENERATOR.AddModule<InputSplineShape>();
                        SHAPE.FreeForm = true;
                        SHAPE.Shape = Road[0];

Where Road[0] is a CurvySpline and the two lane road shape and Road[1] is the divided highway shape.

                        var RECTANGLE = SHAPE.SetManagedShape<CSRectangle>();
                        RECTANGLE.Width = 40;
                        RECTANGLE.Height = 25;

This code gives me a rectangle and the shape is as I expected.  So, how do I assign/reassign the shape at runtime?

Thanks,
El
Reply


Messages In This Thread
Input Spline Shape @ Runtime - by Elenesski - 09-13-2016, 04:49 AM
RE: Input Spline Shape @ Runtime - by Elenesski - 09-13-2016, 07:43 PM
RE: Input Spline Shape @ Runtime - by Jake - 09-21-2016, 07:15 PM
RE: Input Spline Shape @ Runtime - by Elenesski - 09-22-2016, 08:44 PM
RE: Input Spline Shape @ Runtime - by Elenesski - 10-02-2016, 08:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: