I'm working on modelling plant and animal coevolution in Framsticks. I've
ran into a couple of problems that I'm not sure how to address.
1) Sunlight is modelled as simple fast moving creatures, created in the sky,
which have no collision with animals, but collide with plants in a custom
handler that give the plants energy. I need to set the initial velocity
vector for the sunlight creatures; however, I cannot figure out how to do
this in Framsticks.
2) I'm implementing a destructive collision model as follows: if an object
collides with another object, and the part hits head-on (i.e., along the
long axis of the part), no damage occurs to the part. If it is struck
directly on the side, full damage occurs. In between, an intermediate
amount of damage occurs. The given amount of damage is scaled relative to
the stamina of the objects. I can do this if I simply have a vector for
each part's movement (two total), and a vector for each part's orientation
(along the axis of the part). I can get the former easily - MechPart.vx,
vy, and vz. However, I don't know how to get the vector for the
orientation of the part
3) In the collision function, there are Part and MechPart. However, stamina
doesn't exist in either of these - it exists in Joint objects. What would
be a good way, given the colliding parts, to get stamina values?
If anyone can help with these, it'd be a big help. :)