I am new to Blender and but working on some simulation which involves Blender Game Engine. I want my mesh to follow a path while in motion. For that I am doing the following:
- create a KX_SteeringActuator
- configure it on PATHFOLLOWING
- configure velocity, acceleration, turn speed
- potentially setting target and navigation mesh (checking selfterminated)
So my python script has some code like below:
actuators['Steering'].behavior = Path_following
actuators['Steering'].velocity = 3.000
actuators['Steering'].acceleration = 3.000
actuators['Steering'].turnspeed = 120.000
actuators['Steering'].distance = 1.000
actuators['Steering'].target = target
actuators['Steering'].navmesh = navMeshWhole
Now, I can not figure out how do I activate the above actuator, so that my mesh object starts moving towards the target. I want to have a python controller for the above Actuator. If any one has idea or dealt with similar problem, please guide me. I want to write a python controller to activate this actuator.
--> If I have a Keyboard sensor, linked with an And controller which is linked with the above actuator then, if Game Engine started (pressing p in blender), it gives desired behavior on the Keyboard-Sensor key-press. The mesh object navigates towards the target object, following the path. Dont want to use Keyboard sensor and And controller. Thanks a lot !