Jump to content
Horlum

One Problem

Recommended Posts

I use Leadwerks Engine 2.5 Evaluation, but in it there is one problem. In lua i use function of SetPositionf, but result not display. In what may be the problem?

Share this post


Link to post

I tried to change the position of emitter, in FirePit. But he remains at the center, no change.

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...