ahlekoofe / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

gkActionActuator use sec as time unit, but F-Curve Actuator use frame as time unit #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi

I did a simple test and found gkActionActuator use "second" as time unit, but 
F-Curve Actuator use frame as time unit.

But gkLogicConvertor looks like ignore this difference. 

Here is the patch:

[dokinkon:Blender2/Converters]$ svn diff gkLogicBrickConverter.cpp              
                        (07-08 02:28)
Index: gkLogicBrickConverter.cpp
===================================================================
--- gkLogicBrickConverter.cpp   (revision 949)
+++ gkLogicBrickConverter.cpp   (working copy)
@@ -254,8 +254,8 @@
                                la = aa;
                                Blender::bIpoActuator* bia = (Blender::bIpoActuator*)bact->data;

-                               aa->setStart(bia->sta);
-                               aa->setEnd(bia->end);
+                               aa->setStart(bia->sta / animFps);
+                               aa->setEnd(bia->end / animFps);
                                aa->setBlend(0);

                                int mode = 0;

=========================================================
Thanks

Original issue reported on code.google.com by dokin...@gmail.com on 8 Jul 2011 at 6:29

GoogleCodeExporter commented 8 years ago
This patch was applied to trunk.
Thanks.

Original comment by harkon...@gmail.com on 14 Jul 2011 at 5:53