Jump to content

One Problem


Horlum
 Share

Recommended Posts

i not used this is function Update. in this was problem.

Update() function is called every frame. So it's not the best place to call SetPositionf() if you just want to place an emitter in certain position. But it's suitable if you want to move the emitter.

 

I used Update() function just because it was the simplest way to see (and show) result immediately.

  • Upvote 1
Link to comment
Share on other sites

I think it happens because position of emitter overrides in UpdateMatrix() function. UpdateMatrix() occurs every time when you place or move your firepit in Editor.

 

Use something like Move() function in UpdateMatrix() to shift emitter in desired position.

 

    function object:UpdateMatrix()
		    self.heathaze:SetMatrix(self.model.mat)
		    self.fire:SetMatrix(self.model.mat)
		    self.fire:Movef(0,1,0) --move fire up a little
		    self.sparks:SetMatrix(self.model.mat)
    end

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