Jump to content

Marcousik

Members
  • Posts

    682
  • Joined

  • Last visited

Everything posted by Marcousik

  1. You mean that.. There is the spline tool from AggrorJorn somewhere that is very nice too, only that it cuts the hill instead of placing the road on them.
  2. Yes I'm misin gthat too. I begun tracing png decals on the ground under the tires but I became difficulties by calculating the curve the tires do when drifting so it waits to be continued. Here is the thread about this:
  3. Still researching a good car simulation script with LE 4.6, so what's new: I changed some important parameters of my car script to make the car more nervous, better responsive to the world, rapid and giving more feelings and more controls by driving it. Maybe it is not 100% what man can expect but it is now more fun to drive and that's important. The car now calculates and integrates both the forces coming from the world and from the player commands, That means it checks the slope movement of the ground, check its own rotation and adapt its own position depending on the results. The slider joints that simulates the dampers are now using SetSpring() combined with Motorspeed(), The frictions of the tires have a responssive adaptation to the controls, The dampers are now much more heavier than I was used to use, Kynetic energie and inertia forces are integrated to the controls so the car has its own behavior too. I believe I can get it more smoother than actually it is, but it is a completly new way that awaits to be tested.
  4. I can imagine that this for you annoying effect could exactly be desired in another case/game; I mean that the player controller physics reacts to a moving ground, like for example rolling stairs have to accelerate the speed of the player movement going in the same way. So it is really difficult.. Did you try to remove the gravity? SetGravityMode(false)
  5. Really not sure but maybe you could try with resetting the friction force to 0 or just reducing the forces SetFriction(0) https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetFriction
  6. I think to build a infinite world you should leave the player in the center of the world, and move the world around him, or somethin g like that .... Or re-center the world on the origin after the player moves > 500
  7. What now? Is this solved or not? I played a lot with 4096x4096 maps with a lot of models and never got an issue, so this is strange... Maybe I don't understand this. So you say the player + shadow disappear at the edges of the map? Is that correct?
  8. Ok this has no sense just use Joint:GetAngle()
  9. Sure I will - I want to make something like this, maybe with more main wave move: TEMP 2021-05-18 12-28-23.mp4 Adding waves forces directions, and with this shader, a beautiful water feature should now be possible in good performance.
  10. Ok so here I could reproduce the wave equation from the shader (transparent in the video) and apply the same movement on the terrain (with a script)... So waves are now - in a basic form - predictable ? TEMP 2021-05-18 15-29-41.mp4
  11. Yes. But now no idea how to make it in shader language? terrain example 2021-05-18 07-48-01.mp4
  12. Yes it could be, but it is not, or not exactly like that. Shaders have this genious thing to modify the surface using other textures. In this case, havenphilip uses a displacement texture to create the basic waves. So this uses no sin functions in shader. But it is still true that it has a sin composition, so that's my idea too, from a script to try to reproduce this sinusoide that the image containts. It is difficult but not impossible. Once that would be found, I could add fúrther more complex operations (like sin) that the shader adds. I see no other solution. For now I obtained this: The ball floating is coded with a script (no physics) TEMP 2021-05-17 11-46-39.mp4
  13. Hi Slas, It was an idea I got for finding how to calculate the waves movement generated by a shader, but I'm thinking now shader does not move the vertices, does it? So I doubt I can use this method... I'm out of idea how to do this. Calculating the movement with a script seems impossible, while I need to know at a time t which height has a wave to know if a car or whatever is underwater or not.... But thx whatever Edit Tested: Shader doesn't move the vertice so this can't be a method for calculation of shader movement.
  14. Imagine I'm walking with a player on a ground created with a box model scaled at 1500. Now I would like to catch the vertex of the ground-box model that is nearest to the player, how could I do this? https://www.leadwerks.com/learn?page=API-Reference_Object_Surface_Pick if I use a pick on the surface, is there anything to find the nearest vertex or triangle ? Thx a lot, I need to know this.
  15. I found this function in FPSPlayer.lua in relation with kinematics joints / carryingentity.... So this could be usefull for me. But what is this for? I can't find any effect if I change the values of it... thx
  16. Yes sure it works well with adding a sword to a bone. You can even turn the head for example while animated skeleton. But when I told this, I supposed the sword will not get a SetRotation () with movements. For example I had strange issues with the simple rotations of the propeller set as child on an helicopter model: If the movements became too complex, the rotations of the propeller did not match what was expected anymore, going really crazy, just as if the calculation would go too expensive and ended with strange results. So it seems using turn or move on children generated strange results, unless the scene stays simple... I know this helps not a lot, but it something to consider. Seems that using joints with Mass like for car's wheels give a much solider realistic results as turn on no Mass children, even at higher Speed.
  17. Maybe it is not so simple as expected if the bones are controlled by a skeleton?
  18. Shouldn't it be; roadModel:UpdateAABB(Entity.LocalAABB | Entity.GlobalAABB) > I got it from there: https://www.leadwerks.com/learn?page=API-Reference_Object_Surface_Add > No it is not needed. Thx for reply. I don't know where is the problem. In the editor you can easily collapse models with different surfaces/materials and generate a polymesh shape. But seems not possible in script. Because collapsing make the entire model with one unique material. I got the shape to be right generated with this: So I created 2 different models with each one one surface and it runs ok.
  19. mmh I don't get it to work.. Something must be wrong but I don't know what. But I could get it running by creating 2 differents models, but maybe worse for performances.
  20. thx, Yes I tried that. But then I lost the 2 different Materials applied on the 2 different surfaces ! Is there something else ?
  21. How should I set a complete polymesh shape with a script on a model with 2 surfaces? I construct the shape like this: local surf1 = Model:GetSurface(0) local surf2 = Model:GetSurface(1) local Shape1 = PolyMesh(surf1) local Shape2 = PolyMesh(surf2) Model:SetShape(--- ??? ----) How to I set the two shapes on one model ????? Thx for help
  22. So yes it works, a showcase was created simply by posting a new video.
  23. Ok I understood that reversed, post here and it generates in video section ! I will try what you described
×
×
  • Create New...