Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by tipforeveryone

  1. I mean you can apply a material which uses emission shader only for that part of mesh (where is the light position) then use entity:GetSurface() to change the light's stages
  2. Use material with emission shader, only for that light
  3. you can add a specular map to your material, that will look better than just reducing specular color. Use photoshop to make that specular map from diffuse by black and white command, then adjust contrast.
  4. You can get the length of animation by using entity:GetAnimationLength() Then how to get the current frame of an animation, I want to play a sound in the middle of animation so that I need that. Please show me Thanks
  5. I dont feel any diffirence between these functions in final resuilt when applying to a camera. So there is any way to know when to use Zoom or FOV ?
  6. Maybe you should right-click on the viewport then check out RenderMode
  7. I have this problem on 4.6 sometimes, my suggestion is using stable 4.5 instead
  8. I use this for my weapon blocking (by wall) system, I think it will work with your camera You can calculate the distance between the pickInfo.position and the entity which you put start of Pick (Beam Point 1) then use the maximum range of your camera to player (self.defaultCameraRange) minus that, you get the distance between MaxRange to pickInfo.position (called self.collisionMinusRange) Because camera point its Z axis to player, so that you can use entity:Move(0,0,self.collisionMinusRange) In the meantime, Use camera:SetPosition(self.beamPoint2:GetPosition(true)) to keep you camera at the maxRange when not collided any obstacle Hope you can understand what I am trying to explain
  9. You can modify the code and make it work I think, because this function was used in my hand-made PlayerScript then I am not sure it will work on default AI / Player scripts of leadwerks.
  10. target in my function should be an entity, dont try it with Vec3() value
  11. I have a small function which can help you to define if an entity is inside a cone view of another entity. function CheckConeView(axis,entity,target,angle) local z,u if axis == "x" then z = Transform:Point(Vec3(1,0,0),entity,nil) elseif axis == "y" then z = Transform:Point(Vec3(0,1,0),entity,nil) elseif axis == "z" then z = Transform:Point(Vec3(0,0,1),entity,nil) end u = Transform:Point(target:GetPosition(true),nil,entity) z = Transform:Point(z,nil,entity) local targetAngle = Math:ACos(u:Dot(z)/(u:Length()*z:Length())) if targetAngle < angle/2 then return true else return false end end This should be made as global function, then you can use this as below function Script:PostRender() if CheckConeView("z",self.yourPlayerCamera,self.target,90) and self.targetInRange == true then --display health bar code end end hope this make your idea possible
  12. Anyone has an example of this shader usage ? I mean a collection of All texture maps which can combine together on an object. which texture slot should I put those textures into ? By the way, Is there any tutorial which shows me how to create parallax / roughness for leadwerks
  13. Please @Josh can you make ssr depens on specular map ?
  14. Why dont you use all of the methods :"D I have an unique FPSPlayer Control which was built from scratch, kind of useful then I share it via my blog on this site.
  15. Thank you @macklebee this is so clear ! I wonder why there are many functions like this not in document, maybe they are unofficial but still being used in default code somewhere, making everybody confused
  16. Nouse. they are still shiny like hell : ))
  17. It is sad that noone can give me any answer on my posted topics in Technical Assistance :)

    1. martyj


      That's because only one person knows what it does, and that person is very busy with LE5/Turbo

    2. tipforeveryone


      This answer satisfied me hehe

    3. macklebee
  18. I found this in default FPSPlayer.lua while testing Joint:Kinematic but had no idea what was it usage
  19. I use a material which has all 3 textures: diffuse, normal, specular then add ssr.shader to my camera As I expect, the reflection should follow specular map to reflect scene around my object, but it doesn't. When ssr was enabled, everything was reflected on that object's face. Adjust RGB value of Specular is the only one way to control how much reflection on that object But when it comes almost black (to reduce reflection) specular map becomes more useless Is there any way to really control ssr with specular map ?
  20. You can create a simple function which helps you to convert 0-255 to 0-1 function rgba(r,g,b,a) --red green blue alpha, it is like CSS local rgba_value = Vec4(r/255,g/255,b/255,a) return rgba_value end --make this function global then you can use entity:SetColor(rgba(142,36,64,0.8))
  21. crouching was in default FPSPlayer script but it is unofficial, your character can crouch and move around when using: https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetInput, that is a "crouch" boolean. Leadwerks is for human-size or lower character only, bigger one is imposible..
  22. Because of hard-coded character physics cylinder, your character model should be shorter than 1.7m and 60 cm in diameter. when your character is bigger than that, his limbs or head maybe go through object like walls and ceiling etc. Hope character physics capsule with adjustable size will be there in LE5 (I mean Turbo)
  23. It is intesting to think like this: Leadwerks was 4.x years old now, "he" has a son, and the son's name is Turbo, next generation of awesomeness! Someday, Leadwerks will be old and pass away but Turbo will live will to make Leadwerks proud. What a story...
  24. Vote up TGE! Someone may say it "tee-gee"
  • Create New...