Commit Graph

34 Commits

Author SHA1 Message Date
Porteries Tristan
2050ecc307 BGE: Fix T48071: Global logic manager
Previously the logic manager was used as a global variable for SCA_ILogicBrick::m_sCurrentLogicManager,
this request to always update it before run any python script and allow call function like
ConvertPythonTo[GameObject/Mesh]. The bug showed in T48071 is that as exepted the global
m_sCurrentLogicManager is not updated with the proper scene logic manager.
Instead of trying to fix it by updating the logic manager everywhere and wait next bug report to add
a similar line. The following patch propose a different way:
- Every logic brick now contain its logic manager to SCA_ILogicBrick::m_logicManager, this value is
  set and get by SCA_ILogicBrick::[Set/Get]LogicManager, It's initialized from blender conversion and
  scene merging.
- Function ConvertPythonTo[GameObject/mesh] now take as first argument the logic manager to find name
  coresponding object or mesh. Only ConvertPythonToCamera doesn't do that because it uses the
  KX_Scene::FindCamera function.

Reviewers: moguri

Differential Revision: https://developer.blender.org/D1913
2016-04-10 23:57:43 +02:00
Jorge Bernal
0c19a043e8 BGE Ketsji clean-up: double-promotion warnings 2015-12-16 01:53:48 +01:00
Campbell Barton
5fe9b36aa6 Cleanup: style 2015-09-02 18:39:19 +10:00
Campbell Barton
5af7257309 Cleanup: whitespace 2015-08-06 13:03:07 +10:00
Jorge Bernal
2744ce77de Revert part of D1074 related to acceleration taked into account.
It has been reverted because it was affecting obstacle avoidance
(T44041).

This fix should be backported to 2.74
2015-03-21 17:54:49 +01:00
Jorge Bernal
dd3ade250d BGE: Fix for T43994 Steering actuator bug with Navmesh
Now the facing option is taken into account as before

This is a regression and to be ported to the final release branch.
2015-03-15 11:38:04 +01:00
Jorge Bernal
5d0696052a BGE: Fix T41502 Path following jumping
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).

{F142195}

Reviewers: moguri, dfelinto, campbellbarton

Reviewed By: campbellbarton

Subscribers: sergey

Differential Revision: https://developer.blender.org/D1074
2015-02-18 23:24:02 +01:00
Benoit Bolsee
afce1057fd BGE: Fix bug with Steering Actuator Python API.
It was not possible to set the navmesh attribute from Python due to a double bug.
2014-08-09 17:19:13 +02:00
Campbell Barton
2fb8292005 style cleanup 2012-09-16 04:58:18 +00:00
Mitchell Stokes
3b686116ea Fix for bug #30219: "Obstacle Simulation of Steering Actuator does not work with added objects"
The steering actuator was filling its m_obstacle member when it was created (i.e., conversion time), which meant it had the wrong pointer after the actuator was replicated. Now m_obstacle is reassigned when the actuator is replicated.
2012-04-22 02:16:33 +00:00
Campbell Barton
b4a0152e76 code cleanup: float formatting was confusing in some cases - eg: (0.,0.,0.) 2012-04-11 08:15:13 +00:00
Campbell Barton
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
Campbell Barton
640d766370 style cleanup - remove unneeded ';'s 2012-03-08 03:05:57 +00:00
Campbell Barton
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
Campbell Barton
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
Campbell Barton
f62ad8f69b remove header text:
"The Blender Foundation also sells licenses for use in proprietary software under the Blender Licens"

also remove NaN references from files that have been added since blender went opensource.
2011-11-29 10:54:47 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton
6778f7ae05 clear some warnings. 2011-10-09 04:11:18 +00:00
Benoit Bolsee
e6a9b68c79 Recast: upgrade library.
- Upgrade Recast library to latest portable version
- Implement recast_qsort based on FreeBSD qsort.c to have 
  portable thread safe quick sort for use in conversion routine.
- Better default value for the Build Navigation Mesh operator
2011-09-29 21:38:57 +00:00
Nick Samarin
a918040902 synched with trunk at revision 36569 2011-05-16 20:30:59 +00:00
Nick Samarin
b5f4144d25 added option to set "up" vector of the actor orientation using navmesh normal (steering actuator) 2010-08-15 17:40:57 +00:00
Nick Samarin
e6412cd5c6 added function to provide steering vector 2010-08-15 13:14:52 +00:00
Nick Samarin
b822f0bb7a added option for automatic facing in steering actuator 2010-08-15 12:58:13 +00:00
Nick Samarin
a2372308d7 integrated adaptive sampling algorithm for obstacle avoidance 2010-08-04 19:32:37 +00:00
Nick Samarin
870e0e37e5 - fixed bug in steering actuator: calculate 2d distance to target for seeking and fleeing
- added possibility to add navmesh modifier manually in order to transform manually created mesh to navigation mesh (with navigation polygons data layer)
- added possibility to use existed navigation mesh object for navmesh generation (so new object won't be created, but existed object will be updated)
2010-07-29 14:06:48 +00:00
Nick Samarin
e8d129cc76 - added custom get function for navmesh property of steering actuator to accept only objects with NavMesh physics type
- fixed the access to KX_SteeringActuator attributes from scripts
- added enum members for KX_SteeringActuator and KX_NavMeshObject to GameLogic dictionary
2010-07-21 09:16:27 +00:00
Nick Samarin
0fbca1dc19 - added options to enable visualization for obstacle simulation and steering actuator
- added python attributes for parameters of steering actuator
2010-07-15 18:41:29 +00:00
Nick Samarin
e5b3909726 don't add obstacles for navmesh walls in the path following mode 2010-06-23 22:51:26 +00:00
Nick Samarin
c92d0dfdf6 Added:
- obstacle culling for correct simulation in 3d
- flag for steering actuator termination on reaching target
- path recalculation period
- advance by waypoints (for path following)
2010-06-18 23:48:52 +00:00
Nick Samarin
700c32e738 - registration obstacle in game object
- creation obstacle on object replication (including navmesh object)
- creation object transform for navigation mesh directly from blender object instead of using SGNode world transform (because SGNode doesn't exists yet when building navmesh  on ProcessReplica)
2010-06-16 00:23:24 +00:00
Nick Samarin
147e8d01eb - added acceleration and turn speed parameters for obstacle simulation
- added debug visualization for object velocities
2010-06-11 21:13:59 +00:00
Nick Samarin
9d1b8bf0f8 Added segment obstacles, creation obstacles for walls of navigation mesh 2010-06-07 23:09:50 +00:00
Nick Samarin
0932f365bf added obstacle avoidance code; object movement is implemented via setting velocity 2010-06-04 23:29:49 +00:00
Nick Samarin
05b92f0fc9 Added new actuator type for following steering behaviors: seek, flee, path following; renamed KX_Pathfinder to KX_NavMeshObject 2010-05-31 22:35:22 +00:00