Jump to content

tipforeveryone

Members
  • Posts

    382
  • Joined

  • Last visited

Everything posted by tipforeveryone

  1. Lol this is my blog, mate. I want to improve some frame per second by not using another camera to render to texture.
  2. This is from Irsurgency Sandstorm And this is mine How can I make my scope model look Orthographic Projection like that
  3. Draw() and UpdateWorld() behaviors are the same when I put some code inside them. "Script:Draw(): This is called the first time an object is rendered during a scene render." It sounds the same as UpdateWorld() to me. Is scene rendered each frame ?
  4. After reading document page here (https://www.leadwerks.com/learn?page=Tutorials_Lua-Scripting_Introduction-to-Lua) I still can't figure out those functions usage. Can anyone explain more clear ?
  5. Do you have example code of making thing in Joint Fraction section in Lua ?
  6. sometimes I need to put pivot into some small object models but their icons are too big, is it posible to make these icons (camera, pivot, particles etc) keep their size at the same while zoom in and zoom out in editor ? Look at this mess I have
  7. I wonder how the performance is in 2 ways of using variables in lua. Which one is better when there are many of pivots which can be attached script, each script has its own "self." variables Method 1: Use table for everything Script.table = {} --create masster table of scripts function Script:Start() table.category1 = {} table.category1.variable_1 = somevalue table.category1.variable_2 = somevalue ... table.category1.variable_n = somevalue table.category2 = {} table.category2.variable_1 = somevalue table.category2.variable_2 = somevalue ... table.category2.variable_n = somevalue end Method 2: Use Script.variable only Script.valuable_1 = something Script.valuable_2 = something function Script:Start() self.valuable_3 = something self.valuable_4 = something ... self.valuable_n = something end
  8. Thanks macklebee, your explaination is clear as daylight ! so detail. Finally I did it, It took time to understand math in English ^^
  9. I remember first few months of using Leadwerks, I can implement a ragdoll in character bone system (using Joints). I love ragdoll physics when shooting some humanoid target, I guess I will use the same technique to my current game. ragdoll is possible for current bone system (each bone is an entity) but how about Turbo ? Does that mean "NO HOPE" for ragdoll physic for new system.
  10. It sound sweet, then please help me with a simple fomula or steps to archive my calculation
  11. Oh I see, Thanks for pointing it out. If there is one more vector (a) which have known Orange point position, and it is on the same plane with vector u and w (as figure image), and a new beta angle which = 1/2 * alpha angle will it be posible to calculate the Black position ?
  12. Thanks for you reply All of Red, Blue, Black are in 3D and alpha is not a constant Can you help me with a formula, it is bad that I can't remember these basic formulas for triangle calculation red:GetPosition(true) blue:GetPosition(true) u:Length() alpha black:GetPosition(true) = ???
  13. I am not really good at math, Can you show me how to solve this Known: Position of Red and Blue (in Vec3) Length of edge between Blue and Black, Alpha Angle (in Degree) I want to get the position of Black (in Vec3) Thanks
  14. You must use bones (and meshes parented to them as auto weight) to export animation. Export both mesh and its bones. Then applying shader which used for animation on materials of the mesh.
  15. Finally I found the solution for this problem. it is not related to Leadwerks, there was a process named "Rivet Networks Dynamic bandwidth manager" which running on my laptop. The process made CPU run at unstable rate which caused stutter problem.
  16. yesterday my Leadwerks was still normal, but today, I get this problem with FPS, anyone has any idea about which caused this ?
  17. Thanks Josh, I believe in the future of Leadwerks !
  18. Bullet Physic with gravity, now sniping is much more fun
  19. I am trying to build a Top view shooting game First I use Camera:Pick to get collided position by Mouse pointer to Terrain, everything ok, System:Print() can make output of collided position --set shooting point follow mouse cursor mousepos = window:GetMousePosition() mousePickInfo = PickInfo() if camera:Pick(mousepos.x,mousepos.y,mousePickInfo,0,true,Collision.LineOfSight) then shootingPoint:SetPosition(mousePickInfo.position) --shootingPoint is a pivot which I created in Script:Start() System:Print(mousePickInfo.position) end Then I create a ray from player position to mousePickInfo.position then there is problem, the ray can not collide some areas of terrain and return 0,0,0 position, a height map was imported to construct terrain bulletPickInfo = PickInfo() world:Pick( body:GetPosition(true), mousePickInfo.position, bulletPickInfo,0.2,true,Collision.LineOfSight ) I use a context:DrawLine to visualize the ray, and here the video, notice that when I move the mouse, sometime the red line changes its end point
  20. 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
  21. Use material with emission shader, only for that light
  22. 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.
  23. 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
×
×
  • Create New...