Articles tagged with “movers” are articles about the fundamentals of moving things along paths using fast motion setters (llSLPPF).
I need to think a bit about the sources for our courses, including of course the source of the courses for our horses. In particular, a careful reading of NightShade’s masterful and well-organized code for SLRR has made me aware of a kind of access I’ve not really thought deeply about, though I have referred to the concern somewhere in these screeds.
That
_position_at
method bugs me. I could probably explain it, but I’m not sure anyone else can understand it just by reading it. Can we make it a little better? Let’s find out.
Let’s try a compact fast scheme to see what it’s like.
One central issue in our movers is conversion from a distance to a point (and rotation) along a defined path. Let’s explore the space of paths and their representation.
Now that we have this nice little DistanceFinder, let’s work out how to create one that we can use.
I think the Bezier class is quite close to what we need. L_Bezier seems like a valuable component, though I’m not certain of that. What I do not see is quite how to provide quite what the mover code really wants.
I’m still working, slowly, to get my Mac SLua/luau development environment set up to work, if not perfectly smoothly, increasingly smoothly. I have one small idea to try.
My current guess is that we’ll approximate Bezier curves with a polyline representation created by following the control points of 8 sub-curves of the original. Here’s a picture of the accuracy of that approximation.
Still making small changes to smooth my workflow. When common actions go more smoothly, we work with more ease, we tire more slowly, and we are more likely to notice things that need improvement.
I have been doing all my Luau development locally on my Mac for a week or so now. Let me describe my personal development environment, and work a bit on improving it.
Interpolator isn’t doing it for me. Let’s back that out and try something else. We’re here to learn.
In which, we try a smaller object on for size. Doesn’t seem to fit.
Let’s explore the division of responsibilities in the L_Bezier class. I think we’ll learn something useful, and I expect that we’ll improve the code. Here are the two methods we’re considering:
After thinking about searching in my new L_Bezier, I think I’ll try a different storage scheme. Summary article, infinite painful detail left out.
Working toward a polyline creation and use scheme that seems nearly good. We’re learning here.
Let’s begin to create the data structure that represents a linearized Bezier curve. It’s a lot like the thing called “polyline”.
… for searching. Today I want to explore some ideas for searching path objects. That capability is central to the operation of our vehicles. No truly new code, just thinking and some new tests.
It’s time to try a serious Bezier mover in SLua. The result, in my biased view, is quite nice. Lurvely. Added: Caveat.
I am feeling impatient. This tells me that I need to be extra careful today, but I really want to move a prim along a path.
Let’s try that idea for improving
make_waypoints
. I have a good feeling about that.
There is a school of thought in object-oriented programming that tends to create many very small and simple objects. And there are the other folks.
No, not Pigs in Space, curves. I plan to do some Bezier experiments in Aditi, leading to some motion experiments, distance approximations, who knows what all. Certainly I don’t.