forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParticleTest.py
More file actions
33 lines (25 loc) · 776 Bytes
/
ParticleTest.py
File metadata and controls
33 lines (25 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
if __name__ == "__main__":
from direct.directbase.TestStart import *
from panda3d.physics import LinearVectorForce
from panda3d.core import Vec3
from . import ParticleEffect
from direct.tkpanels import ParticlePanel
from . import Particles
from . import ForceGroup
# Showbase
base.enableParticles()
# ForceGroup
fg = ForceGroup.ForceGroup()
gravity = LinearVectorForce(Vec3(0.0, 0.0, -10.0))
fg.addForce(gravity)
# Particles
p = Particles.Particles()
# Particle effect
pe = ParticleEffect.ParticleEffect('particle-fx')
pe.reparentTo(render)
#pe.setPos(0.0, 5.0, 4.0)
pe.addForceGroup(fg)
pe.addParticles(p)
# Particle Panel
pp = ParticlePanel.ParticlePanel(pe)
base.run()