particle-system

Need help on speeding up a particle system (or how to ask turtles not to ask other turtles.)

允我心安 提交于 2019-12-12 02:27:58
问题 As a toy, it works well but obviously, when It scales up it bogs down. How can I do this system without asking turtles to ask the other turtles? the code is thus. to go ask turtles [ ask other turtles [ set heading towards myself let D distance myself let C .1 / D - 1 / (D ^ 2) if C > 1 [set C 1] fd C ] ] tick end I should know how to do this but the brain is not working. I will race y'all to the answer and post my own if I get it first. 回答1: You're doing essentially an N-body simulation. The

Particle system looks different on iOS 6 and ios7

放肆的年华 提交于 2019-12-12 02:27:13
问题 I have a couple of particle systems on my app that I checked originally on an iPad 3 with ios7. The particles looked and behaved like I expected them, but when I test on an iPad2 with ios6. The particles are displaced up and are smaller. I have a subclass for the particles. Here's the code for one of my particle systems. I was wandering if the CGREctMake is positioning the particle in a different area on a non retina display, but that doesn't happen when I position other things on the display

Removing Background of SKView - Particle Emitter - SpriteKit

流过昼夜 提交于 2019-12-11 22:44:12
问题 So I followed this tutorial and created a small particle emitter for when the player achieves a goal (kinda like a celebration). I'm using a single view application, just like the tutorial, but I can't seem to remove the background of the emitter... so I get a black square underneath the particles. I changed the View / SKView in storyboard to clear colour, but it still appears to be black when the app is run... Apple Docs say this: To create an emitter with no background color, set the

Why is collision response allowing bouncing sphere to eventually pass through Plane?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 09:44:30
问题 I'm currently replicating a particle system in Unity (C#). I am adding physics to each particle (represented by a sphere) to allow it to bounce off a plane located at the origin. The particle bounces a number of times, being affected by gravity. As the bounces become smaller the sphere starts passing through the plane until finally falling through. The force of gravity will be continuously acting on the particle. What is the proper way to stop the sphere on top of the plane? I have included

How to get one of the particle system?

妖精的绣舞 提交于 2019-12-11 08:46:13
问题 I have an enemy prefab(ZomBunny) in it their are two partial systems which are to be played when the enemy is hit and when the enemy die.The problem i am facing is ,i can only access only one of the particle system(HitParticle) when using the down below code. Hierarchy EnemyHealth public class EnemyHealth : MonoBehaviour { public int startingHealth = 100; // The amount of health the enemy starts the game with. public int currentHealth; // The current health the enemy has. public float

How to create a Raining Effect(Particles) on Android?

痴心易碎 提交于 2019-12-11 03:12:40
问题 I am developing a 2d android strategy game, it runs on SurfaceView, so I can't(or can I?) use LibGdx's particle system. And I would like to make a raining effect, I am aiming for something like this( http://ridingwiththeriver.files.wordpress.com/2010/09/rain-fall-animation.gif ), I don't need the splash effect in the end (although that would be superb, but probably would take up a lot of system resources). How could I achieve that raining effect? Any ideas? 回答1: The easiest would be to put

Scaling of the point sprites (Direc3D 9)

旧巷老猫 提交于 2019-12-10 21:56:06
问题 Tell me please what values should ​​I set for D3DRS_POINTSCALE_A, D3DRS_POINTSCALE_B, D3DRS_POINTSCALE_С to point sprites scaled just like other objects in the scene. The parameters A = 0 B = 0 and C = 1 (proposed by F. D. Luna) not suitable because the scale is not accurate enough and the distance between the particles (point sprites) can be greater than it should be. If I replace the point sprites to billboards, the scale of the particles is correct, but the rendering is much slower. Help

Get started with animated typography/particles in javascript (mapping particles to a word)?

早过忘川 提交于 2019-12-10 11:44:48
问题 Alright, so I have a good deal of experience with HTML and CSS, and some experience with Javascript (I can write basic functions and have coded in similar languages). I'm looking to start some visual projects and am specifically interested in getting into particle systems. I have an idea for something similar to Codecademy's name generator here (https://www.codecademy.com/courses/animate-your-name/0/1) where particles are mapped to a word and move if hovered over. It seems as though alphabet

Sprite Particle System animation in viewController

一笑奈何 提交于 2019-12-10 10:48:18
问题 I create a macOS single window application and add a Sprite Particle System file with template Stars . and the visual effect just like this: And I want to add it to my viewController, as the guide of this answer, I got the result like this, and it was not which I desired: override func viewDidLoad() { super.viewDidLoad() let scene = SCNScene() let particlesNode = SCNNode() let particleSystem = SCNParticleSystem(named: "Welcome", inDirectory: "") particlesNode.addParticleSystem(particleSystem!

Threejs Particle System with joining lines. Programming logic?

孤街浪徒 提交于 2019-12-10 10:32:02
问题 Based on a previous question I had recently posted: How to create lines between nearby particles in ThreeJS? I was able to create individual lines joining nearby particles. However, the lines are being drawn twice because of the logic of the particle system. This is because of how the original 2D particle system worked: https://awingit.github.io/particles/ This also draws the lines twice. For each pair of particles connecting a line, the line is drawn. I do not think this is ideal for