Tag Info

New answers tagged

0

To make a particle track your finger motion you first need to track at least two different events in onTouchEvent(), and possibly a third depending on what you want to happen when you lift your finger. You need to check for MotionEvent.ACTION_DOWN and MotionEvent.ACTION_MOVE, and possibly MotionEvent.ACTION_UP. The first event you will set the initial ...


1

I would recommend an animated Projector. You'd simply configure the IgnoreLayers property to ignore your player. And you could animate the effect with a simple script to modify the UV offsets of the material you use. One thing to remember is for every object a projector is projected onto an extra draw call is issued (just like a light), so use them ...


0

you have to create an array of pooled effects Array<PooledEffect> effects = new Array<PooledEffect>(); so, in render(), you draw all effects from array. for(int i = 0; i < blocos.size();i++){ if(obj.colision(block.get(i),config)) { PooledEffect effect = block.get(i).getEffectPool().obtain(); ...


1

When you call effect.setPosition(...), it changes the position of all the emitters, but not of the particles. In libGDX, there is currently no way of changing the position of a single particle, so in order to draw particles at 2 locations, you must do the following: // Pseudo-code move effect at position 1 add particles move effect at position 2 add ...


1

It might be related to your Update function: function Update() { if (triggered && Input.GetKeyDown(KeyCode.JoystickButton1)) particle1.SetActive(true); particle2.SetActive(true); particle3.SetActive(true); } Having no brackets, only particle1.setActive(true) is in the condition. The other two will be called on each ...


0

Not familiar with LibGDX Particle Emitters especially, but according to this site one of the options for a particle is attached, which makes the particles stay the same distance away from the emitter regardless of movement This is somewhat confirmed by the official github-wiki, though the documentation is not 100% clear too me regarding this point. ...


1

Without being able to modify the position of the individual particles, I don't think you're going to be able to achieve what you're looking for. Take a look at a live wallpaper that I made, source available here. What I do here is I track each particle individually, and I can move them according to the rules set by the appropriate system. If a particle hits ...


1

Yes, it can. A simple way of doing so would be to just set the particle size to "Random Between Two Constants" as described here, choosing two constants that work for you, and using the texture sheet animation module to refer into a texture where each row represents the animation of a particle (and setting the "Random Row" checkbox). You could also just ...


1

Another option would be to spawn a fixed number of snow particles and make them teleport to the top when they reach the bottom of the screen. This is trivial but in your case it should work fine.


0

Does the screen have game interaction or impact? Is it necessary to draw it in the same pass as the rest of the world, or even with the same camera for that matter? If the snow is mostly acting as an aesthetic overlay then do your render in two passes: Begin render. Render your world using the dynamic world camera. End render. Begin snow render. Render ...


1

Try not to think in screen position, but world position. Place the emitter above the camera position with some offset each frame and spawn particles from there.



Top 50 recent answers are included