Hi, i have made another patch for the bge, it features the getLinearVelocity() improvement AND a new python function: alignToNormal(), that function is based on a script made by wiseman303, that aligns the object’s local z axis with a given normal (for example the face right under his feet), so games like sonic, f-zero or a snowboarding game can be done easily with alignToNormal() and a ray sensor.
OLD PATCH dl link (WARNING: this patch will not apply over the current SVN version!)
edit:
i have changed alignToNormal(normal) to alignAxisToVect(vect, axis) as suggested in the mailing list, so now you can align ANY axis with a given vector. also it’s a bit more “error safe”
Last I saw he’s working on a Sonic game, which can be a very damanding type of game. Expect at most plenty of patches from him as he starts doing more advanced movements, badniks, dangers, ect…
i have changed alignToNormal(normal) to alignAxisToVect(vect, axis) as suggested in the mailing list, so now you can align ANY axis with a given vector. also it’s a bit more “error safe”
To others: The thing is to try not to get too dependent on functions that are not officially in the BGE yet.
lol, my patches are “to whom it my concern” if it’s useful to anyone and s/he is capable to apply the patch & build blender, nothing should stop him/her to use the new functionality!
I’m not discouraging you, people can use it, your stuff will likely be commited, but some features by other developers may end up not going in the next official release like Wizard’s Tiles.
Still it can easily be used for large projects if people had an updated build with the feature.