AggrorJorn Posted February 10, 2010 Share Posted February 10, 2010 I have this candle with a small flam particle attached to it. the particle itself is correct, but everytime I insert the candle in the scene. The flame is going into another direction. (see image). Is there some way to control the angle of a particle? (the rotation of the particle itself is set to 0) Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 10, 2010 Share Posted February 10, 2010 is the flame an emitter ? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 10, 2010 Author Share Posted February 10, 2010 is the flame an emitter ? yes. object.fire=CreateEmitter(25,100,Vec3(0,1,0),0,object.model) object.fire:SetPositionf(0.01,0.52,-0.01,0) object.fire:Paint(LoadMaterial('abstract::candleflame.mat'),0) object.fire:SetRadius(0.1,0.1) object.fire:SetColorf(0.2,0.2,0.2,1,1) object.fire:SetWaver(0) object.fire:SetVelocity(Vec3(0,0.5,0),Vec3(0,0.05,0)) object.fire:SetRotationSpeed(0) object.fire:SetArea(Vec3(0.05,0.05,0.05)) Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 10, 2010 Share Posted February 10, 2010 object.fire:SetVelocity(Vec3(0,0.5,0),Vec3(0,0.05,0)) what are you trying to do here ? velocity is a Vec3 the above might act as x,y,z so you have direction in X and Y when you probably only want direction in the +y .. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 10, 2010 Author Share Posted February 10, 2010 object.fire:SetVelocity(Vec3(0,0.5,0),Vec3(0,0.05,0)) what are you trying to do here ? velocity is a Vec3 the above might act as x,y,z so you have direction in X and Y when you probably only want direction in the +y .. hmm I used it to ad a litlle motion to the the flame. The velocity is effective when you create the particle and says in which direction the particle goes. I don't think the vilocity is the problem, since the values are going only in the y direction. But even if I would remove the vilocity then the flame texture still has a random angle. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 10, 2010 Share Posted February 10, 2010 Edit the particle vertex shader so rotation is not used. I am not sure why you are using an emitter for this, though. In version 2.31, the particle velocities will be sent to the vertex shader. This could be used to orient the particles in the direction they are moving, for sparks and things like that. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 10, 2010 Author Share Posted February 10, 2010 What would you otherwise suggest instead of using a particle? Quote Link to comment Share on other sites More sharing options...
Josh Posted February 10, 2010 Share Posted February 10, 2010 A mesh oriented to face the camera. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 10, 2010 Author Share Posted February 10, 2010 A mesh oriented to face the camera. Sorry but I don't know how that would work. Do I have to think about a deforming mesh (which would complicate the situation) or are you suggesting an old style plane that is faced towards the camera with an animated texture? Quote Link to comment Share on other sites More sharing options...
Josh Posted February 10, 2010 Share Posted February 10, 2010 The second thing you said. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 10, 2010 Author Share Posted February 10, 2010 OK thanks, I'll have a go with animated textures. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.