Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Orientation in 2D
#4
hmmm, I'm hoping there's a procedural approach rather than having to manually adjust every control point. For context, let's imagine a 2D rollercoaster where the course is procedurally generated. I'm trying to keep the car on the same side of the track regardless of uphill, downhill, or loopDeloop. I've succeeded in created the spline dynamically, and getting the car to follow the spline. But the sprite keeps rotating in 3D space around the 2D spline on some, but not all, curves. When I inspect the spline, it is correct when the spline orientation is on the 2D plane, and incorrect when the orientation blends to 3D.

I'm setting my splineController orientation Source to Tangent and my Target to Forward, which is what I assumed to be the right approach to keep my cars on the correct side of the track. But it seems like the splineController is calculating the tangent from the 3D orientation of the spline for some reason.

In the attached pic, you'll see the car going up the track, and the spline orientation is pointing to the right. Then, instead of continuing to point to the outside of the trackĀ , the orientation starts to rotate to the left, which makes the sprite rotate in 3D space ("get skinny") and switch sides of the track.
   

I'm hoping there's a setting I've got wrong, that would keep this in pure 2D procedurally.
Reply


Messages In This Thread
Orientation in 2D - by Livealot - 07-24-2018, 09:54 PM
RE: Orientation in 2D - by _Aka_ - 07-25-2018, 11:47 AM
RE: Orientation in 2D - by _Aka_ - 07-25-2018, 11:59 AM
RE: Orientation in 2D - by Livealot - 07-26-2018, 03:05 PM
RE: Orientation in 2D - by _Aka_ - 07-26-2018, 04:11 PM
RE: Orientation in 2D - by Livealot - 07-26-2018, 04:41 PM
RE: Orientation in 2D - by _Aka_ - 07-26-2018, 06:10 PM
RE: Orientation in 2D - by Livealot - 07-29-2018, 09:31 PM
RE: Orientation in 2D - by _Aka_ - 07-30-2018, 12:35 AM
RE: Orientation in 2D - by Livealot - 07-30-2018, 04:47 PM
RE: Orientation in 2D - by Livealot - 07-30-2018, 11:27 PM
RE: Orientation in 2D - by _Aka_ - 07-31-2018, 10:13 PM
RE: Orientation in 2D - by Livealot - 08-01-2018, 12:30 AM
RE: Orientation in 2D - by _Aka_ - 08-01-2018, 12:12 PM
RE: Orientation in 2D - by Livealot - 08-01-2018, 08:00 PM
RE: Orientation in 2D - by _Aka_ - 08-02-2018, 10:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Shapes points orientation itsGama 3 8 01-18-2023, 02:51 PM
Last Post: _Aka_
  2d - orientation looping_co 1 5 09-01-2022, 04:17 PM
Last Post: _Aka_
  Spline controller orientation itsGama 4 31 01-24-2022, 06:38 PM
Last Post: _Aka_
  Regarding static orientation mydayz 10 288 12-05-2021, 01:25 PM
Last Post: _Aka_

Forum Jump: