Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Goober King

Point to point movement

This topic is 5155 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If you want to move from point A to point B in X number of steps that one is easy. Just the distance / x. But let's say we want to make the same move from point to point in the same number of steps BUT we want to do it in uneven amounts. So that we take bigger steps at the begining or end and then make smaller steps at the other end. Same start place and time. Same end place and time. Just a different way of getting there. How would one go about that one? I need to move things along a series of points but I don't want to make it obvious every time I hit a new point. Would be nice to have something less harsh. More fluid. Oops. I think I was on the wrong tab and the wrong forum for this question as its not Graphics really. Sorry. [edited by - Goober King on April 11, 2004 8:30:32 PM]

Share this post


Link to post
Share on other sites
Advertisement
Search for other types of interpolation, you described linear. I think bezier (sp) is another.

Share this post


Link to post
Share on other sites
quote:
Original post by honayboyz
Search for other types of interpolation, you described linear. I think bezier (sp) is another.


I thought Bezier was more curve which would be taking longer ways to the same point and kinda overkill for my needs. These will be part of mostly short seqences.

Share this post


Link to post
Share on other sites
quote:
Original post by Goober King
Oops. I think I was on the wrong tab and the wrong forum for this question as its not Graphics really. Sorry.
Agreed, but no worries.

[Moved to: Math and Physics]

A B-Spline between the points on your path will make the switching between points less obvious - basically a smooth curve between them all.

Tracing along a B-Spline uses, I believe, a parameter (i.e. it''s a parametric curve, point = f(T)). If you were to vary the rate at which that parameter changes (dT/dt) then it should vary the rate at which your point moves along the curve.

Share this post


Link to post
Share on other sites
You define a function for position at each time, and then solve the differential equation for getting the velocity (as the derivative of the position). Or just do it discretely; calculate pos(t+1)-pos(t) for velocity this step.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!