Page MenuHome

BGE: Fix T41502 Path following jumping
ClosedPublic

Authored by Jorge Bernal (lordloki) on Feb 7 2015, 3:38 AM.

Details

Summary

New Lock Z velocity parameter was added. This parameter avoid the micro-jumping.
By default it is actived except when you load an old file that it is deactived to keep former behaviour.

Additionally it was solved another issue related with the acceleration: That is the acceleration value was not taked into account and we had always the maximum linear velocity from the beginning of movement. Now the acceleration is taken into account until we reach the maximum velocity.
When you load an old file, the acceleration value is set to the maximum range (1000.f). This way we simulate a maximum velocity constant from the beginning of movement (former behaviour).

Diff Detail

Repository
rB Blender
Branch
bge-bug-path-finding

Event Timeline

Jorge Bernal (lordloki) retitled this revision from to BGE: Fix T41502 Path following jumping.
Jorge Bernal (lordloki) updated this object.

I'm not totally convinced with this solution. I'm investigation a more complete solution that takes care the other issues in the steering/path following actuator as acceleration is not taking into account, there is no curved movement in the turns, etc.

  • New Lock Z velocity parameter was added. This parameter avoid the micro-jumping. By default it is actived and when you load an old file is deactived to keep former behaviour.
  • Additionally it was solved another issue related with the acceleration: That is the acceleration value was not taked into account and we had always the maximum linear velocity from the beginning of movement.

Now the acceleration is taken into account until we reach the maximum velocity. When you load an old file, the acceleration value is set to the maximum range (1000.f). This way we simulate a maximum velocity constant from the beginning of movement (former behaviour).

Sergey Sharybin (sergey) added inline comments.
source/blender/blenloader/intern/versioning_270.c
634

No need to bump subversion yet. Just use DNA_struct_elem_find for until next bump is actually needed.

P.S. Rule of thumb is: subversion bump is only done when major changes to DNA are made.

Campbell Barton (campbellbarton) requested changes to this revision.Feb 11 2015, 6:00 PM
Campbell Barton (campbellbarton) edited edge metadata.

Only small comment

source/blender/blenloader/intern/versioning_270.c
641

if this flag is new, why does it need to be cleared?

This revision now requires changes to proceed.Feb 11 2015, 6:00 PM
Jorge Bernal (lordloki) edited edge metadata.
  • No subversion bump needed
  • No flag clearing needed
source/blender/blenloader/intern/versioning_270.c
634

Ok.

641

It is not need to be cleared. I just removed

Campbell Barton (campbellbarton) edited edge metadata.
Campbell Barton (campbellbarton) added inline comments.
source/blender/blenkernel/intern/sca.c
499

*picky*, space around |

This revision is now accepted and ready to land.Feb 18 2015, 10:24 AM
Jorge Bernal (lordloki) edited edge metadata.
  • Update to current master
  • minor style change
This revision was automatically updated to reflect the committed changes.