I’m trying to get my particles look as if a flame is coming out of the exhaust of my spaceship. It looks fine when viewed directly behind it: https://imgur.com/WAyz3qR
However from the side it looks like this: https://imgur.com/LiCgHS7
Any help would be much appreciated
There are a few ways to better fill the volume:
Add more particles (I have used a lot; they are efficient); tune. Perhaps the emit number could be tweaked for velocity.
Particles can also have long + narrow texture, can be oriented, can be very short lifespan…
For examples, you may have seen ‘fire’ etc.
RibbonTrail: not particles, but great for making a smooth efficient trail. We have used these together with particles before.
fireEmitter = mSpaceship.engineNode->CreateComponent<ParticleEmitter>();
fireEffect = fireEmitter->GetEffect();
smokeEmitter = mSpaceship.engineNode->CreateComponent<ParticleEmitter>();
smokeEffect = smokeEmitter->GetEffect();
This is what I have currently ^^
I got it from this link: http://urho3d.wikia.com/wiki/Particle_Effects
I tried the ribbon trail and as the craft is close to the screen it looks very 2D.
I believe part of the problem may be that the positions where the particles are spawned is not interpolated. Maybe scaling the emitter size with the object’s velocity would fill the gap nicely?
Sorry for being a newb but how do I do that?
fireEffect->SetEmitterSize(Vector3(0.0f, 0.0f, node_->WorldToLocal(rigidBody_->GetLinearVelocity()).z_
…if I’m not mistaken.
Thats absolutely perfect, thank you so much, looks amazing is it alright to ask another quick question while on here or should I open a new topic, It’s just to do with collision in zero gravity. When my spacecraft collides with a box it sets the node or rigidbody funny, to get around this i have to quickly set mass to zero then back to one.
I’m not sure what could be causing that.
It should really be the responsibility of the
ParticleEmitter to interpolate new particle starting positions. I’ll give it a whirl, should only be a handful of changes.
Edit: this gist should do it, changes are in
ParticleEmitter::EmitNewParticle and the ctor/header (for the cached positions, and sig change to EmitNewParticle). Couldn’t test, temporarily one-handed and can’t work a mouse worth a damn with my left - but it doesn’t break anything in NinjaSnowWar.
Thanks for asking; with more detail can venture a better guess; I am assuming you mean the spacecraft node/rb are set funny.
Is it using TriangleMesh CollisionShape?
Note that the triangle mesh collision shape is not supported for moving objects; it will not collide properly due to limitations in the Bullet library. In this case the convex hull or GImpact triangle mesh shape can be used instead.
Gravity is set to zero and when I hit an object with my spacecraft. The craft will spin. I can still move but the spacecraft will spin whilst moving in the direction i wish to go to.
Currently, I’m using a box collider:
And thank you Sinoid, your help is much appreciated and works like a charm
Ah - good info. Apart from mass, you could tune RigidBody physics attributes – I think Angular Damping in particular?
Can find these in physics docs linked, class reference, ScriptAPI.dox …
Alright thank you very much for this, I’ll be sure to check it if you have the time would you be able to check out my other question available at Quaternion Rotation.
I’m absolutely baffled by it