Aligning a Pivot to

Blitz3D Forums/Blitz3D Programming/Aligning a Pivot to

Eric(Posted 2004) [#1]
I have a ship that orbits a planet, It have a Center pivot that helps me orient the Camera, I need a way to align the pivot with the center of the planet so it is always level. Just an FYI I position entity and rotate the pivot independent of the Ship, because I want the pivot to maintain it's orientation independent of the Ship. Can anyone Help?


big10p(Posted 2004) [#2]
Could you have another go at explaining that? I've read it several times and am still unsure what you mean.


Shambler(Posted 2004) [#3]
Not quite sure what you mean either but have you tried pointing the camera at the planet using PointEntity ?


Eric(Posted 2004) [#4]
Ok, I have a Ship, with a Pivot Child.

I have a Sphere, with the ship orbiting around it. Draw a line from the center of the sphere thru the Ship. and align the Pivot's Y axis to that Line. how do I determine the Angles to align the Pivot?

Any better?


DJWoodgate(Posted 2004) [#5]
It sounds like something you might be able to use aligntovector for...

vx#=EntityX(ship,1)-EntityX(planet,1)
vy#=EntityY(ship,1)-EntityY(planet,1)
vz#=EntityZ(ship,1)-EntityZ(planet,1)

AlignToVector campiv,vx,vy,vz,2

Not entirely sure if that is what you want or not though. The camera pivot should perhaps not be a child of the ship, I thought that was what you said first of all. It will make a difference.