splines of cubic'ness

Started by
0 comments, last by evilchicken 21 years, 12 months ago
yeah Im having problems with cubic splines, this is what I got. I store 1500 ms worth of positional data (I recieve position updates every 100ms) to build my spline. x1 = x position 100ms from now (extrapolated) from x2 y1 = "" x2 = last recieved position packet y2 = "" x3 = packet recieved before x2 y3 = "" x4 = packet recieved before x3 y4 = "" //build spline A = x4 - 3 * x3 + 3 * x2 - x1; B = 3 * x3 - 6 * x2 + 3 * x1; C = 3 * x2 - 3 * x1; D = x1; E = y4 - 3 * y3 + 3 * y2 - y1; F = 3 * y3 - 6 * y2 + 3 * y1; G = 3 * y2 - 3 * y1; H = y1; client.pos[0] = float(A * pow(0.75f,3) + B * pow(0.75f,2) + C * 0.75f + D); client.pos[2] = float(E * pow(0.75f,3) + F * pow(0.75f,3) + G * 0.75f + H); its still choppy, grr. why?
Advertisement
For what type of game are you using this?

www.persistentrealities.com for Inline ASM for VB, VB Fibre, and other nice code samples in C++, PHP, ASP, etc.<br/>Play Yet Another Laser Game!<br/>

This topic is closed to new replies.

Advertisement