Candy Camera

Blitz3D Forums/Blitz3D Programming/Candy Camera

Shambler(Posted 2005) [#1]
I'm having a problem with particle candy and haven't yet found a solution.

Basically particles should face the camera by default but they aren't, they are staying aligned to the Z axis.

My code is

;start of program
Include "particle candy.bb"
Include "particle types.bb"
;Initialise Player
InitPlayer(p.player,0,0,0,0,0,0)
;Initialise Particles ( p\camera is a camera attached to the player)
InitParticles(p\camera, "particles.png", 3)
;Create an effect using the built in Torch type
machine\mesh%=CreateEmitter_Torch()
;In the main loop
updateparticles()
;In my update function called once a frame
If  Emitter_HasFinished(machine\mesh%) Then Emitter_Start machine\mesh%


The emitter is working in that it is emitting particles, the particles are animating but they don't turn to face the camera...strange.

I tried using ParticleType_HorizontalAlign P1,0 in the particle types.bb but it didn't make a difference and anyway particles are meant to align to the camera by default.

Any ideas???


GfK(Posted 2005) [#2]
Dunno. I used CandyFactory to create particles for ParticleCandy. Its a lot easier being able to edit particles and see the result immediately, rather than trying to code it all from scratch.


Shambler(Posted 2005) [#3]
Arrrg..!! found the problem ^^

I had a stray
InitPlayer(p.player,xs#,ys#,zs#,ws#,ps#,rs#)

Lurking in the darkness.

Works fine now =)


_PJ_(Posted 2005) [#4]
Turn the lights on ;)


Shambler(Posted 2005) [#5]
Lights are next in the 'thingstodo' list ;)