I'd like to build a force field and particle system in Blender Game Engine, what I'd like to achieve is exactly this;


I want an object to release particles and another object to attract them. But I'm not sure how can I do that since there is no particle system in Blender Game Engine.

I'd be grateful if you can tell me a way to achieve this.


1 Answer 1


As you already discovered there is no special "particle" object in the BGE.

You can use ordinary objects (typically mesh objects).


As you want to get multiple copies of it, you place the original in an inactive layer.

enter image description here

Have one object (the emitter) in an active layer constantly add copies of the original (e.g. via edit object actuator). You can give the added objects an initial velocity when the original is a physics object (e.g. rigid body).

enter image description here


The particles copy the logic of the original too. So the particles can setup themselves e.g. they can play an animation or initiate a random motion.

enter image description here

Force field

Constantly find particle objects within the desired range (e.g. via a near sensors). To focus on particles you can filter the objects by a property (e.g. all particles have the property "particle").

enter image description here

Then you apply forces to all the found objects. You need to create a custom brick (python controller) to read the sensor and apply the according force/velocity/location change.

move_up (simple example)

import bge

sensor = bge.logic.getCurrentController().sensors["Near"]
for particle in sensor.hitObjectList:


The sample result looks like that:

enter image description here

To pull the particles near the force field center you need to calculate the according forces to do that.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .