i have an array of positions and rotations of an object
how can i make the object to follow a path like in the spline but i need the rotation also
i have searched the forum but didn't find what i need
could somebody give me a tip
spline !?
Re: spline !?
of course: "don't eat yellow snow !!!"Ghus wrote:could somebody give me a tip
but seriously, I think you should code it on your own...
it should not be too hard tho...
move the node from point A to point B...
for the rotation point A is the starting angle and point B the destination angle, so you can calculate the rotation for each point of the line easily...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
yeah, will probably help when coding this...Mag-got wrote:vector3df::getInterpolated(vector3d<T> &other, f64 d)
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hi all
thanks for the reply (sorry if my english is not perfect )
so can i do something like this
const core::vector3df newPos;
f32 percent0to1 = 1.f * (timer->getTime() - startTime) / timeToTake;
if (1 < percent0to1) {
// we're done
}
else
{
newPos = startPos.getInterpolated(endPos, percent0to1);
node->setPosition(newPos);
}
can i use get interpolated and make the same thing with the rotation?
my rotation is in vec3 format also
thanks for the reply (sorry if my english is not perfect )
so can i do something like this
const core::vector3df newPos;
f32 percent0to1 = 1.f * (timer->getTime() - startTime) / timeToTake;
if (1 < percent0to1) {
// we're done
}
else
{
newPos = startPos.getInterpolated(endPos, percent0to1);
node->setPosition(newPos);
}
can i use get interpolated and make the same thing with the rotation?
my rotation is in vec3 format also