Jump to content

psychoanima

Members
  • Posts

    76
  • Joined

  • Last visited

Everything posted by psychoanima

  1. It's like asking why do you want to use masks in photoshop. I tought that idea is clear with this feature, you are masking the light where you don't need it, without adding geometry in front of the light source that is acting as a light blocker. In video industry they are using physical cardboards to shape the light, in digital word we are using masking methods with polylines, beziers, projected bitmaps etc. I know that this is possible with volumetric lights with geometry in front of that source, but this is cheaper to calculate and it's usable for static shadows. How to solve this problem in Leadwerks: I want to project a shadow vignette on the wall/ground that has the shape of some object that is not physically in the scene (or it's present in the scene but I want to avoid extra light calculations). Like in the video example above.
  2. I saw this option in old Havok Vision engine and it's really useful: (demonstration of this feature starts at 1:10 - 1:20)
  3. Thanks! That solved my problem! However, because my camera is attached to the character, during rotation camera shakes. I solve that like this: function Script:Start() self.camera = Camera:Create() self.cameraZ = self.camera:GetPosition().z self:UpdateCamera() end function Script:UpdateCamera() self.camera:SetRotation(35,0,0) self.camera:SetPosition(self.entity:GetPosition().x,self.entity:GetPosition().y, self.cameraZ ) self.camera:Move(0,0,-120) end I don't know if there is easier or more clean way to do this, but it works.
  4. Math:CurveAngle() works perfect for my rotation need. Now I have another problem. My character is moving on X and Z axis but needs to stay locked on Z and to move only on X. I read in one post this method for locking: (in function Script:Start()) vec = self.entity:GetPosition()] & ( in function Script:UpdateWorld()) self.entity:PhysicsSetPosition(0,0,vec.z) but nothing is changing in the viewer, it's still floating on Z
  5. That's really cool idea for rotation, thanks! Do you think it can be easily implemented with the script bellow: http://www.leadwerks.com/werkspace/topic/12651-2d-platformer-player-script-example/page__hl__platformer (I am using the same logic like in function Script:UpdatePhysics() )
  6. Or most likely I misunderstood this parameter. What is actually rotating, some example maybe?
  7. I don't know how to set maxrotationspeed for SetInput and to avoid ultra fast body turn. I read in API reference that maxrotationspeed is in degrees per physics step, but I still don't understand which number is giving slower rotation?
  8. That makes it more clean, tnx! I will investigate, thank you!
  9. I am using Josh 2D platformer script example, but I have to reshape a lot of things cuz not everything is working how I wanted. I am not sure how to find AnimationManager lua class, I am rookie here, sry BTW SetInput function is a time saver for sidescroller moving!
  10. I found the answer for one part of my question. I forgot to mention that for running animation I was using Time:GetCurrent() in SetAnimationFrame, that's why I get unwanted cycling animation. My code is now like this: local isrunning = 1 function Script:Draw() if window:KeyDown(Key.C) then isrunning = isrunning +1 self.entity:SetAnimationFrame(isrunning,1,1) end now I need to figure out how to add Idle when no key is pressed and how to blend it properly.
  11. I have 3 .fbx animation, one is for running, second is idle, third jumping. (2.5d platformer) To trigger running I am using if window:KeyDown(Key.D) then self.entity:SetAnimationFrame() end Problem: how to trigger idle animation since there is no Key release function? And how to blend it with previous animation? Second problem: I notice this when I am using KeyDown function: When I am pressing key to start the animation, releasing the key stops animation in the viewer, but animation is still looping somewhere in the background. I noticed that when I do quick press/release button on my keyboard - animation is cycling instead of starting from beginning.
  12. ooooh, I get it. It's lua function... I found an explanation. Sry for this stupid question (I suck in Lua, need to fix that)
  13. I am analyzing some scripts and I found math.abs but I can't find explanation in API reference. Help?
×
×
  • Create New...