Jump to content

CrazyM

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by CrazyM

  1. Looks like my laser deflection game is going to need a ghoulish twist.
  2. Thanks, I'll opt out of the beta for now and see if the problem persists.
  3. I have a Lua script that has the following exposed property. Script.pawns = nil --entity "Pawns" The Pawns entity is a pivot used as a parent to several other entities. Inside the script, I use this reference to iterate through the children. childCount = self.pawns:CountChildren() for i=0, i<childCount-1, 1 do --Some action end This normally works great, but I've had three occurances of this reference suddenly reading as nil when no change occurred in the script, and the UI for the exposed property still shows the Pawns entity being linked. Once this nil error occurs, nothing short of deleting the Pawns pivot, creating a new pivot and re-parenting all my child entities, and re-linking the Pawns property corrects the problem. I have tried un-linking and re-linking the reference, removing and re-adding the script, nothing else seems to work, and I've made no change to warrent reference failure.
  4. When editing an objects position, rotation, or scale from the General tab of the editor, it would really be nice to be able to copy and paste vectors instead of each axis individually.
  5. Thanks guys, I'm glad there's some interest. I'll get to work on the first tutorial.
  6. I have been working on a simple laser deflection game that dynamically creates geometry-based beams that automatically calculate deflection, bounce angles, and allow the player to rotate deflectors to guide the beam to the goal. As I familiarize myself with the Leadwerks API, I thought I might share my experiences and code examples here if anyone is interested. Please let me know if this sounds interesting and I will continue.
  7. FYI, Math:Abs() is not listed in the command reference. It's available, and works as expected, just not documented. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/math/
  8. It would certainly make it easier than my current header file strategy of "I wonder what this does".
  9. I'm assuming you mean top-down camera instead of 3rd person since you want the roof to disappear when the player walks in. If that's the case, here's the general approach. Start by performing a raycast (Pick) from your camera to the player and enable the [closest] parameter. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/camerapick-r199 If the returned pickInfo.entity is not your player, then you can assume some kind of overhang (roof) is covering the player. Swap the material on the overhang. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/material/materialsetshader-r247
  10. Thanks Josh, I'm working with the data now. To anyone interested, I found a really great article on processing audio with an FFT window. I think this might work, though I may have to read the article 3-4 more times. Part I http://www.edn.com/electronics-news/4383713/Windowing-Functions-Improve-FFT-Results-Part-I Part II http://www.edn.com/electronics-news/4386852/Windowing-Functions-Improve-FFT-Results-Part-II If I can build a getspectrum function, then we can try convince Josh to include it in the API. Having this ability brings a lot of cool possibilities, lip sync, music-based games, etc.
  11. I know, old post, but I wrote this LUA swinging door script as an alternative to the built in script, and maybe someone else might find it useful. This script does not use a hinge joint, it assumes it's attached to a 3D model door with it's pivot point on the side where a normal hinge would go. Set a [1] on the rotation axis you wish to rotate, adjust the movement speed, the open/close angles, and link to optional open/close sounds. It also assumes your operating the door from the FPSPlayer script. Script.rotationAxis = Vec3(0,1,0) --Vec3 "Rotation Axis" Script.movementSpeed = 3 --float "Movement Speed" Script.closeAngle = 0 --int "Close Angle" Script.openAngle = 135 --int "Open Angle" Script.closeSound = "" --path "Close Sound" Script.openSound = "" --path "Open Sound" rotation = Vec3(0,0,0) moveDoor = false openDoor = false openSnd = nil closeSnd = nil function Script:Start() if self.openSound ~= "" then openSnd = Sound:Load(self.openSound) end if self.closeSound ~= "" then closeSnd = Sound:Load(self.closeSound) end end --FPSPlayer Use method function Script:Use() if openDoor == true then if closeSnd ~= nil then closeSnd:Play() end openDoor = false else if openSnd ~= nil then openSnd:Play() end openDoor = true end moveDoor = true end function Script:UpdateWorld() -- Stop movement if the open/close angles have been reached if self.rotationAxis.x == 1 then -- X rotation axis set if openDoor == true and self.entity:GetRotation().x >= self.openAngle then moveDoor = false end if openDoor == false and self.entity:GetRotation().x <= self.closeAngle then moveDoor = false end end if self.rotationAxis.y == 1 then -- Y rotation axis set if openDoor == true and self.entity:GetRotation().y >= self.openAngle then moveDoor = false end if openDoor == false and self.entity:GetRotation().y <= self.closeAngle then moveDoor = false end end if self.rotationAxis.z == 1 then -- Z rotation axis set if openDoor == true and self.entity:GetRotation().z >= self.openAngle then moveDoor = false end if openDoor == false and self.entity:GetRotation().z <= self.closeAngle then moveDoor = false end end -- Move the door towards it's selected position if moveDoor == true then if openDoor == true then -- Close door if self.rotationAxis.x == 1 then rotation.x = rotation.x + (Time:GetSpeed() * self.movementSpeed) end if self.rotationAxis.y == 1 then rotation.y = rotation.y + (Time:GetSpeed() * self.movementSpeed) end if self.rotationAxis.z == 1 then rotation.z = rotation.z + (Time:GetSpeed() * self.movementSpeed) end else -- Open door if self.rotationAxis.x == 1 then rotation.x = rotation.x - (Time:GetSpeed() * self.movementSpeed) end if self.rotationAxis.y == 1 then rotation.y = rotation.y - (Time:GetSpeed() * self.movementSpeed) end if self.rotationAxis.z == 1 then rotation.z = rotation.z - (Time:GetSpeed() * self.movementSpeed) end end self.entity:SetRotation(rotation) end end
  12. I know, old post, but I want this also.
  13. So the bank->buf contains four bytes of data in a char array format, and I can convert this back to an int, but how do I read the next four bytes?
  14. Yes, I've played with the workshop, it's great, but I was also under the impression there is no option there for monetization.
  15. I'm trying to tap the OpenAL raw audio data to see if it can be processed with an FFT window to build a live stream of the spectrum or amplitude of a playing audio file. This is quite simple in FMOD since it ships with a getSpectrum function. However, we are evaluating the feasibility of bringing our automated lip sync solution, originally built for Unity on top of FMOD, to Leadwerks, and after speaking with Josh, including FMOD as a built in option for Leadwerks users isn't an option at this time. Personally, we would love to see an asset store for Leadwerks as we think Unity has proven it's a good source of income for the host company, encourages developer involvement, and makes it easier for new developers. It is popular enough to convince Unreal Engine to get on board and open their own asset store. Josh informed me that the Bank class pointer references the raw data but I'm struggling to determine if the data in the bank->buf could be processed through an FFT window. Are there any OpenAL pro's here that know if this can be done, and might be will to share some expertise? In case anyone is interested or curious, here are some of our promotional videos for our solution on Unity. Thanks
  16. Same here, I'm still getting the "Failed to initialize graphics" message as the UI loads.
  17. Maybe a Steam code-based private beta if you don't want it to roll out to all beta users? This NUC is dedicated to the cause and only used as a test machine so it's a good candidate.
  18. Any chance you can post that to the steam beta branch? I have an Intel Haswell NUC with HD 5000 graphics running Ubuntu 14.04 LTS, with OpenGL 3.0 Mesa 10.2.2. I'd love to test the Linux build on it.
  19. Thanks for everyones assistance, Macklebee discovered my error, I had SetPickMode to Sphere where it should have been using Polygon. Macklebee, much appreciated. There is no issue with the Blender cube or Blender exporter for this purpose.
  20. Thanks for posting that example test cubes. What I've discovered is that the bad normal values are only being returned on prefabs that are instantiated into the scene at runtime. If I place the block in the scene at design time, the normals are correct. I am setting the rotation to (0,0,0) on instantiation, but still getting the bad values. After trying your cubes, I tried my Blender cubes again and found the same thing, the Blender cube works fine when placed in the scene at design time, but not at runtime.
  21. Yes, I deleted the import file and the resultant mdl and meta files before importing the new file.
  22. Same issue with a Blender FBX 6.1 ASCII export. Leadwerks doesn't seem to like the Blender FBX 7.5 binary export.
×
×
  • Create New...