|
![](/i/fill.gif) |
Tim Nikias wrote:
>> If you've done it some different way, I'd be curious to hear how. :)
>
> Nope, looks like I'm doing it much the same way, though I store all
> three axis' and the position of the ball in an external file.
Sure, not much difference if you store two vectors or all three. I also
stored the information in an external file of course, being the only way to
transfer data from frame to frame. :) Btw. I think it's a good idea to once
in a while (or just in every frame to make it simpler) force the three
vectors to be perpendicular to each other to prevent accumulated precision
errors to slowly skew the matrix.
> I'm not yet sure how to pull it off, but I also want to script some
> functionality to have balls stay in a relative global position of the
> original rolling sphere (like always on top), but roll as if moved by
> the parent. One idea I had for a robot-like character was to have the
> main sphere's upper hemisphere covered with some metallic surface,
> and in these I set several such smaller spheres that are supposedly
> electromotors or such to move the big sphere.
So if the big sphere is not just a ball but also a vehicle, then you'd need
to store vectors for the vehicle's alignment as well as for the ball's, the
difference being that the vehicle keeps having an up-vector that corresponds
to the up-vector of the ground, and a forward-vector that is the direction
the vehicle moves in (typically). This, along with the position, which is
the same as for the ball, could be used to get the transformation for the
vehicle's upper hemisphere etc., which stays fixed regardless of the ball's
rotation. From this, it should be no problem to calculate global points that
are in a fixed relative position to the vehicle.
Your project sound very interesting. I'm looking forward to see the
progress. :)
Rune
--
3D images and anims, include files, tutorials and more:
rune|vision: http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk
Post a reply to this message
|
![](/i/fill.gif) |