[PATCH] getLinearVelocity() now can provide local velocity as well (applied)

hey, look at this patch i recently submitted to blender, its a new feature for getLinearVelocity()

https://projects.blender.org/tracker/index.php?func=detail&aid=10492&group_id=9&atid=127

Note: the patch was applied in 2.46, so you wont need it anymore :smiley:

However, here is a blendfile using the function (really simple)
https://projects.blender.org/tracker/download.php/9/127/10492/5786/localtest.blend

Since you’re a developer now it’s very good you want to make the BGE more advanced.

Just note that it will be in after 2.46 is released, as we are in feature freeze, don’t worry, it may be in right after 2.46 release:eyebrowlift:

It’s also good you’re starting with small features such as this, just to get familiar to the code before doing big upgrades.

thanks cyborg dragon, i know about the release cycle, maybe for 2.47?

2.50 is the next version, if you have good clean code, then it’ll definitely be in 2.50.

Since you seem to have started on a big project yourself (that sonic game) it looks like you’ll address a number of the shortfalls of the BGE for big projects as you code in features you need.

I’ve really missed this feature. Of course the same could be accomplished with a python script, but this is more convenient and faster way.

the local velocity thing is the core of my speed-driven animation system (cool name, eh?), so it may be useful to other projects.

actually, i translated that python script to c++, i’m pretty sure that there is a more efficient way to achieve the same result (blender code is huge and i couldn’t read it all), but that function works really well, doesn’t break compatibility, is a bit faster and far more elegant&easy than that python script.

If you need help with anything in the code it would be good to have contact with Ben as he knows his way in the code.

Good communication between BGE developers would be good for this end of Blender.

the patch was applied in 2.46, so you wont need it anymore :smiley:

However, here is a blendfile using the function (really simple)
https://projects.blender.org/tracker/download.php/9/127/10492/5786/localtest.blend