Quote: "I don't see how that would help with rotation because the other vertex doesn't take into account rotation"
When an object rotate, its vertex rotate...right? so if we simple position second object on x,y,z of a vertex, it won't rotate unless we point the object to other vertex of the same object....here an example
autocam off
sync on
make object box 1,10,10,10
color object 1,rgb(0,255,0)
make mesh from object 1,1
make object box 2,2,2,12
color object 2,rgb(255,0,0)
position camera -20,20,-20
point camera 0,0,0
do
r#=r#+0.1
make mesh from object 1,1
lock vertexdata for mesh 1
x# = get vertexdata position x(11)
y# = get vertexdata position y(11)
z# = get vertexdata position z(11)
x2# = get vertexdata position x(8)
y2# = get vertexdata position y(8)
z2# = get vertexdata position z(8)
position object 2,x#,y#,z# rem POSITION IN VERTEX 11
point object 2,x2#,y2#,z2# rem POINTING VERTEX 8
unlock vertexdata
yrotate object 1,r#
sync
loop
Other example...this one takes into acount object position but sencond object works in the same way...position in one vertex and point to other vertex.
autocam off
sync on
make object box 100,50,0,50
color object 100,rgb(0,255,0)
` player
make object box 1,3,3,3
color object 1,rgb(255,0,0)
position object 1,-15,1,10
`object to add
make object box 2,1,1,5
color object 2,rgb(255,255,0)
position camera -20,20,-20
point camera 0,0,0
do
set cursor 0,0
print "use arrowkeys"
if upkey() then move object 1,0.02
if downkey() then move object 1,-0.02
if rightkey() then turn object right 1,0.5
if leftkey() then turn object left 1,0.5
make mesh from object 1,1
lock vertexdata for mesh 1
x# = get vertexdata position x(11)+object position x(1)
y# = get vertexdata position y(11)
z# = get vertexdata position z(11)+object position z(1)
x2# = get vertexdata position x(8)+object position x(1)
y2# = get vertexdata position y(8)
z2# = get vertexdata position z(8)+object position z(1)
position object 2,x#,y#,z# rem POSITION IN VERTEX 11
point object 2,x2#,y2#,z2# rem POINTING VERTEX 8
unlock vertexdata
sync
loop
I'm not a grumpy grandpa
