parent objects to rolling ball?

Blitz3D Forums/Blitz3D Programming/parent objects to rolling ball?

What's up with all the empty replies?

Anyway, to achieve this, you'll have to parent it yourself.

Just knocked this up, don't blame me if it sets fire to your dog.

type link
    field rX#,ry#,rz#
    field ent1,ent2
end type

function entityParentPosition(entity,parent)
       o.link=new link
       o\rx=entityX(entity)-entityX(parent)
       o\ry=entityY(entity)-entityY(parent)
       o\rz=entityZ(entity)-entityZ(parent)
       o\ent1=entity
       o\ent2=parent
end function

function updateLinks()
    for l.link =each link
        positionEntity l\ent1,entityX(l\ent2)+l\rx,entityY(l\ent2)+l\ry,entityZ(l\ent2)+l\rz
    next
end function


With that you can manually create position only parent/child relationships for one entity at a time.

entityParentPosition(Ball,Camera)

then call updateLinks once per frame.