Page MenuHome

BGE: Fix for T42709 (mouse look + character related)
AbandonedPublic

Authored by Jorge Bernal (lordloki) on Jan 23 2015, 11:43 PM.

Details

Summary

With this fix the character takes into account the movements that come from mouse look actuator.

Basically, it takes the rotation of the both axes from the mouse movement and it adds them to the character direction.

File for testing:

Diff Detail

Repository
rB Blender
Branch
bug-bge-mouselook-character

Event Timeline

Jorge Bernal (lordloki) retitled this revision from to BGE: Fix for T42709 (mouse look + character related).
Jorge Bernal (lordloki) updated this object.

This area isn't really maintained AFAIK, if you're sure this fix is good and tested well, I think you could go ahead and commit it.

source/gameengine/Ketsji/KX_MouseActuator.cpp
224–241

Can't this be simplified?

rotation = MT_Vector3(0, 0, 0)
rotation[KX_ACT_MOUSE_OBJECT_AXIS_X  - m_object_axis[0]] = 1.0;

same below

tsk, should be m_object_axis[0] - KX_ACT_MOUSE_OBJECT_AXIS_X

  • Assigning unit vector simplified

@Campbell Barton (campbellbarton) wrote:

This area isn't really maintained AFAIK, if you're sure this fix is good and tested well, I think you could go ahead and commit it.

I tested the fix and it works but it needs that the mouse look actuator is above character actuators. I'm trying to find a way to solve this.

Bug fixed by @Thomas Szepe (hg1) at commit rB29e968a

Closing this differential as it has no sense now. Thanks for reviewing