Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. @ cassius there is a entity:SetFriction command in LE3: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetfriction-r142 @nelsoncs your cubes have to have a physics body, their masses set greater than 0 or the engine thinks the mesh is static, and you have to use PhysicsSetRotation/PhysicsSetPosition or the physics get broken function App:Start() self.window = Window:Create() self.context = Context:Create(self.window) self.world = World:Create() self.camera = Camera:Create() self.camera:Move(0,2,-4) self.light = DirectionalLight:Create() self.light:SetRotation(35,35,0) self.ground = Model:Box(10,.1,10) self.ground:SetColor(0,1,0,1) local shape = Shape:Box(0,0,0, 0,0,0, 10,.1,10) self.ground:SetShape(shape) shape:Release() self.model1 = Model:Box() self.model1:SetColor(1,0,0,1) self.model1:SetPosition(0,1,0) self.model1:SetMass(1) local shape = Shape:Box(0,0,0, 0,0,0, 1,1,1) self.model1:SetShape(shape) shape:Release() self.model2 = Model:Box() self.model1:SetColor(1,.5,0,1) self.model2:SetPosition(0,2.0,0) self.model2:SetMass(1) local shape = Shape:Box(0,0,0, 0,0,0, 1,1,1) self.model2:SetShape(shape) shape:Release() rotY = 0 return true end function App:Loop() if self.window:Closed() or self.window:KeyHit(Key.Escape) then return false end self.model1:PhysicsSetRotation(0,rotY,0,.1) rotY = rotY + 1 if rotY==360 then rotY = 0 end Time:Update() self.world:Update() self.world:Render() self.context:Sync() return true end
  2. sure... shadmar just repeats aggror's and my suggestions and he gets all the praise! lol and btw, the mouse position is already in screen space coordinates, so no need to transform if you are just using them to draw a line
  3. Well you are clearing the context - why? And typically you would set the color back to 1,1,1 when done using draw commands. And the example I was showing you can be just cut and pasted basically into a entity script... granted you will have issues anytime the entity itself is not rendered.
  4. if you are using the default fpsplayer script here then its causing your problem. It sets the player pickmode to 0. The better method would be to turn the pickmode off just prior to its picks then back on afterwards.
  5. Example script here might help: http://www.leadwerks.com/werkspace/topic/10274-world-pick-collision-type-doesnt-work/#entry75890
  6. Sure if you are using something besides the lua edition, but this information would be extremely useful for those using lua.
  7. You should probably attach an example map because you can't tell where the box is located in relation to the ground from that picture.
  8. World:SetSize() World:SetCullRange() World:SetGravity()
  9. The navmesh isn't dynamic. If you change something that needs to be reflected in the navmesh, then you have to rebuild it. But the problem isn't the terrain size, its the world size. In LE2, the world size set the physics boundaries. In LE3, it appears to be also used in calculating the navmesh boundaries, except for some reason it fails to properly create the navmesh when the world size is larger than 1024. It looks like the problem is related to the original bug that was thought to be fixed: http://www.leadwerks.com/werkspace/topic/10033-nav-mesh-isnt-big-enough/
  10. Yeah cassius I was talking about yougroove's problem. Your issue sounds more like the standalone hasn't been updated to reflect that prior bug fix which appears to have not been properly fixed.
  11. The problem shown in yougroove's map is due to the worldsize set in the scene's Root property. If you change the worldsize to 1024 and rebuild the navmesh, then it properly covers the csg and terrain. This is definitely a bug unless it was intentional for navmesh generation to only be applied to worldsizes of 1024 (which I cannot imagine is the case).
  12. It's only problematic if you try to use a local position of a parented entity when you need a global position. If the entity doesn't have a parent then its local position is equal to its global position. Just have to be aware of what you need for the circumstance being performed.
  13. Now that this post has completely devolved into fantasy land like these topics always do, I want Josh to implement the command 'MakeGame(gametype)' that automatically creates a complete fps/rpg/etc with all the bells and whistles so I don't have to program anything.
  14. There are two issues that prevent your pick from being successful. 1) The pickmode script is using the local position of entity p2 for the endpoint of the pick self.posP2 = self.p2:GetPosition(false) which wouldn't be an issue except that you parented entity p2 under entity p1. The world pick uses global positions. So you can either un-parent p2 in the scene panel or the better method would to use the global position of both p1 and p2 in your script. self.posP1 = self.entity:GetPosition(true) self.posP2 = self.p2:GetPosition(true) 2) The fpsplayer script sets the player's pickmode to 0. This makes it so it will be skipped in all pick tests. This was done so its own physics body wouldn't interfere with the picks it performs in the fpsplayer script. You can comment that line out and your script will detect the player, but the better way would be to turn off the player's pick mode just prior to its two picks and then turn it back on afterwards. Or rewrite the player's picks so it starts away from the player so its own body doesn't interfere.
  15. if you start watching at the 25:30 minute mark you see that he created a pivot entity in the scene, renamed it as "Timer", then added the Timer.lua script to that pivot.
  16. as far as i know the only thing that shows up in the scene tree are actually entities. so add the scripts you need to entities (models, csg brushes, pivots, cameras, etc...) then drag the entity onto the flowgraph editor
  17. Well you can select the faces and shift/rotate/scale the UV for the face as needed, but from what I can see it doesn't appear that the texture lock works at all, unless I am missing some caveat on how to use/implement. If I rotate the cylinder about its x/y/z axis with texture lock on or off, the texture doesn't stay in the direction it was set originally.
  18. see the example script posted here: http://www.leadwerks.com/werkspace/topic/10274-world-pick-collision-type-doesnt-work/#entry75890
  19. you have to specify the animation frame: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetanimationframe-r141 also the editor comes with some inherent scripts that can help. look at the monsterAI and the animationmanager scripts.
  20. Maybe the fact that your controller stepheight is being set to 0 that's causing an issue? Maybe try 0.2? Also, in earlier versions of LE2, we had to play around a lot with the physics iteration parameter in the controller:Update() function. You could try increasing/decreasing that value to see if it helps.
  21. yes it is in lua. I have been using it for a couple of weeks.
  22. yes you do. maybe you need to update your project.
  23. The new improvements have made life so much simpler. What used to be a frustrating day of troubleshooting and working between various applications to import just one model's multiple animations is now a 10 minute job. Thanks! One more request on future additions to the model Editor: maybe the ability to select multiple animations at a time just for deleting purposes?
  24. There is no selection box. You can pick the items you want while holding the CTRL key. Or you can pick everything in the scene using EDIT-->Select All.
×
×
  • Create New...