Jump to content

thehankinator

Members
  • Posts

    436
  • Joined

  • Last visited

Everything posted by thehankinator

  1. I think it is the name of the function as a string.
  2. Have you verified that the animated shaders are being used on the materials?
  3. A little way down here I talked about field of view: http://www.leadwerks.com/werkspace/topic/12805-basic-sneaking-tutorial/
  4. I'd be all about another crawler style creature. Anyway I think it's cool the Merc is available, I've been meaning to pick it up for a while now.
  5. I am having trouble getting the instantaneous change working. I've updated my original script (below) to set the new flags. Unfortunately I am not getting the instantaneous change I was expecting. I used default for everything except maxrotationspeed, I set it to 0. I also tried setting maxrotationspeed to 360 as well as detailed to true but that didn't help either. Did I misunderstand how to use this change? I am opt into beta. --Create a window window = Window:Create() context = Context:Create(window) world = World:Create() local camera = Camera:Create() camera:SetRotation(35,0,0) camera:Move(0,0,-8) local light = DirectionalLight:Create() light:SetRotation(35,35,0) --Enable navmesh debugging camera:SetDebugNavigationMode(true) --Create the ground local ground = Model:Box(10,1,10) ground:SetPosition(0,-0.5,0) ground:SetColor(0.0,0.25,0.0) --Create a shape local shape = Shape:Box(0,0,0, 0,0,0, 10,1,10) ground:SetShape(shape) shape:Release() --Enable navigation obstacles ground:SetNavigationMode(true) --Create a character player = Pivot:Create() local visiblecapsule = Model:Cone(16, player) visiblecapsule:SetScale(1,2,1) visiblecapsule:SetPosition(0,1,0) visiblecapsule:SetRotation(90, 0 ,0) player:SetPosition(0,0,0) player:SetMass(1) player:SetPhysicsMode(Entity.CharacterPhysics) while not window:KeyHit(Key.Escape) do if window:Closed() then return false end Time:Update() if window:KeyHit(Key.Right) then player:SetInput(-90, 0, 0, 0, false, 1, 0.5, false, 0) end if window:KeyHit(Key.Left) then player:SetInput(90, 0, 0, 0, false, 1, 0.5, false, 0) end if window:KeyHit(Key.P) then System:Print(player:GetRotation(true).y) end world:Update() world:Render() context:Sync() end
  6. Be careful, the LE function takes degrees where as the built in lua function takes radians(since 4.0).
  7. Looks awesome, I think the other options you added will also be useful also. Thanks!
  8. Only reason I downloaded it was to see what the big deal was lol
  9. I'm working on an action RPG something similar to Diablo style. When I click on the screen I want my character to immediately turn to the direction of the click and fire.
  10. How could I make a character controller instantly face a direction?
  11. UU3D nor FBX converter could open that file, seems like whatever you exported it with did so with a really old version of FBX or did so incorrectly.
  12. If I do SetInput(roty, 1) it turns the correct angle but the next frame I need to do SetInput(roty, 0) otherwise it keeps moving. Seems like a hack, or is this the desired behavior? Below is the key I pressed and the value printed after pressing that key Left 50.4 Right 180 Left 169.2 Right -154.8 Left 151.2 Right -140.4 Left 129.6 Right -126
  13. Isn't the model rotation tied to the character controller object? It must be because the model rotates properly when I use the navigation functions. Also the model is definitely not visibly rotating to +-90 even if the prints are not reliable.
  14. Same behavior, modded script below --Create a window window = Window:Create() context = Context:Create(window) world = World:Create() local camera = Camera:Create() camera:SetRotation(35,0,0) camera:Move(0,0,-8) local light = DirectionalLight:Create() light:SetRotation(35,35,0) --Enable navmesh debugging camera:SetDebugNavigationMode(true) --Create the ground local ground = Model:Box(10,1,10) ground:SetPosition(0,-0.5,0) ground:SetColor(0.0,0.25,0.0) --Create a shape local shape = Shape:Box(0,0,0, 0,0,0, 10,1,10) ground:SetShape(shape) shape:Release() --Enable navigation obstacles ground:SetNavigationMode(true) --Create a character player = Pivot:Create() local visiblecapsule = Model:Cone(16, player) visiblecapsule:SetScale(1,2,1) visiblecapsule:SetPosition(0,1,0) visiblecapsule:SetRotation(90, 0 ,0) player:SetPosition(0,0,0) player:SetMass(1) player:SetPhysicsMode(Entity.CharacterPhysics) local roty = 0 while not window:KeyHit(Key.Escape) do if window:Closed() then return false end Time:Update() if window:KeyHit(Key.Right) then roty = -90 end if window:KeyHit(Key.Left) then roty = 90 end player:SetInput(roty,0) if window:KeyHit(Key.P) then System:Print(player:GetRotation(true).y) end world:Update() world:Render() context:Sync() end
  15. The script below Left arrow sets 90 degrees and RIght sets -90. Using the P key you can print the y rotation, it rarely achieves the requested rotation. Is there some kind of limitation for how big of an angle change I can put into SetInput? --Create a window window = Window:Create() context = Context:Create(window) world = World:Create() local camera = Camera:Create() camera:SetRotation(35,0,0) camera:Move(0,0,-8) local light = DirectionalLight:Create() light:SetRotation(35,35,0) --Enable navmesh debugging camera:SetDebugNavigationMode(true) --Create the ground local ground = Model:Box(10,1,10) ground:SetPosition(0,-0.5,0) ground:SetColor(0.0,0.25,0.0) --Create a shape local shape = Shape:Box(0,0,0, 0,0,0, 10,1,10) ground:SetShape(shape) shape:Release() --Enable navigation obstacles ground:SetNavigationMode(true) --Create a character player = Pivot:Create() local visiblecapsule = Model:Cone(16, player) visiblecapsule:SetScale(1,2,1) visiblecapsule:SetPosition(0,1,0) visiblecapsule:SetRotation(90, 0 ,0) player:SetPosition(0,0,0) player:SetMass(1) player:SetPhysicsMode(Entity.CharacterPhysics) while not window:KeyHit(Key.Escape) do if window:Closed() then return false end Time:Update() if window:KeyHit(Key.Right) then player:SetInput(-90,0) end if window:KeyHit(Key.Left) then player:SetInput(90,0) end if window:KeyHit(Key.P) then System:Print(player:GetRotation(true).y) end world:Update() world:Render() context:Sync() end
  16. Will the DLC include the source files (fbx, png, etc?) like the workshop store did? If so, will the existing DLC be updated to include source files?
  17. What are you trying to accomplish?
  18. I don't think it's possible to do it like you want to. I would create a trigger zone to check if the player is within the area in question.
  19. Is there a tab or something in the Workshop browser that was a list of the items I've purchased? I've not found it yet. If I've bought more than a couple things it'd be nice to see what all I have in one spot (and be able to install individual items from that same list). I could see myself buying something, and a few months down the line forgetting not only that I bought it but that it exists at all.
  20. Split-screen local multiplayer can be done with lua using the render target option on two (or more) cameras. There is also Buffer class but for some reason it's never been documented so I never bothered with it. But as Rick said you would need a library or c++ to do remote multiplayer. Dynamic map generation can be done with lua, typically you start with with a few generic pieces, load them and place them based on whatever algorithm you like. I think someone added something to the workshop about procedural map generation, never tried it, dunno how far they got. http://steamcommunity.com/sharedfiles/filedetails/?id=634318904 UI is easily done in lua, I built this a while back, http://steamcommunity.com/sharedfiles/filedetails/?id=653673604
  21. Doh, I'm an idiot, please delete this thread so I can forget my shame!!
  22. More of a discussion on the subject rather than the bug report but what's the right way to express a direction that would be an ambiguous euler value like that? Is it best to just avoid using the result of GetRotation()?
  23. When using: box:SetRotation(Vec3(57.493263, 9.582211, 114.986526), true) Under the hood, is that still considered adding degrees even though it's a hard coded value?
  24. Can't capitalize W in window. window.TitleBar window.TitleBar See the original post in the screen shot below:
×
×
  • Create New...