Jump to content

tipforeveryone

Members
  • Posts

    382
  • Joined

  • Last visited

Everything posted by tipforeveryone

  1. 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 ?
  2. I have this problem on 4.6 sometimes, my suggestion is using stable 4.5 instead
  3. 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
  4. 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.
  5. target in my function should be an entity, dont try it with Vec3() value
  6. 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
  7. 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
  8. Please @Josh can you make ssr depens on specular map ?
  9. 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.
  10. 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
  11. Nouse. they are still shiny like hell : ))
  12. I found this in default FPSPlayer.lua while testing Joint:Kinematic but had no idea what was it usage
  13. 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 ?
  14. 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))
  15. 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..
  16. 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)
  17. 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...
  18. Vote up TGE! Someone may say it "tee-gee"
  19. I found this in https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetPickMode Where can I get a full list of this PickMode ? (I found one anyway, Entity.PolygonPick)
  20. My game showcase after 2 years of development, this video will show you some of completed features
  21. This is still not in document, is it unofficial or you forgot to add it ? @Josh
  22. After 2 years learning and using leadwerks, I decided to refresh with C++. But I still feel unclear about the role of C++ and need to be explained (even I watched Agro's video about Lua and C++) When I build my game in VS2017 and run it for testing, it does exact the same as running game from Editor with pure Lua script (F6) or running from published .exe. I don't comprehen the way C++ cooperate with Lua. I want to know more detail about the relationship between Lua and C++. If I write a C++ file and how does that file run in my game. I am newbie to C++ and there are no many up to date tutorial out there. Thanks
  23. I don't find any example, please give me some to understand how this Joint works thanks
×
×
  • Create New...