Jump to content

Rotate particle


AggrorJorn
 Share

Recommended Posts

is the flame an emitter ?

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

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))

Link to comment
Share on other sites

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 .. :o

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

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 .. :o

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.

Link to comment
Share on other sites

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...