Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. Are you getting shader and material mixed up because what you describe is exactly how it works. I right click a texture in the Assets folder and select Generate Material. It automatically makes the material with the same name as the texture for me. I then can pick a different shader to apply to this material. This is how it works today in LE 3. How are you doing it?
  2. ?? I right click textures and make materials from that all the time? If your normal and spec follow a certain naming scheme they will even get automatically assigned to the right slots. How is this different than what you are asking for?
  3. I still can't get any drag and drop conversions to work on my Win 8.1 Pro directly in the LE editor. I have to drag the files into the LE folders and then they get auto converted.
  4. You could probably send the map to the support email and Josh might be able to fix it or tell what happened so it doesn't happen again. Or maybe upload it here.
  5. We have that, but doesn't seem like we have xz() Also a nice enhancement would be to use Math:Curve() to smoothly rotate to desired position.
  6. Thanks YouGroove. I added that to the Lua snippets (I changed it for lua). Thanks shadmar any and all will help it become a great resource for all. [edit] YouGroove, I can't get that to work in Lua. Have you tried it in Lua yet?
  7. I agree, Lua should have this information. For things like tower defense games this would be very handy.
  8. Why you gotta make me a liar Very cool.
  9. For Lua, I would say yes based on what Josh has said before. However it might not go the other way depending on what you are doing inside Lua. If you load DLL's to do various things in your Windows Lua game, for example, you can't load DLL's in the Steam edition so it won't work. Just something to be aware of. Why load DLL's you might ask? The ability to do networking would be a reason.
  10. I got it. It was holding the pitch and yaw from the 3rd person view still. So I reset the rotation but keep the yaw because that keeps the camera over the shoulder but by resetting the pitch before moving the camera gives me a FPS style when looking up and down, which is what I wanted. Now I'll rotate the waist by the same pitch and it should give a nice effect when in first person. Final code is: if self.zoomed == false then -- move the camera to the player self.entity:SetPosition(self.Character:GetPosition(true)) -- set the rotation of the camera self.entity:SetRotation(Vec3(self.cameraPitch, self.cameraYaw, 0), true) -- offset the camera self.entity:Move(self.xDistance, self.yDistance, -self.zDistance) else -- move the camera to the player self.entity:SetPosition(self.Character:GetPosition(true)) self.entity:SetRotation(Vec3(0, self.cameraYaw, 0)) local pos = self.entity:GetPosition(true) -- offset the camera self.entity:Move(self.xDistance, self.yDistance, -self.zDistance) -- set the rotation of the camera self.entity:SetRotation(Vec3(self.cameraPitch, self.cameraYaw, 0)) end
  11. I'm trying to switch from 3rd person camera to first person camera which is really zoomed in over the should but I want it to behave like a first person. The below code is attached to a camera object in the scene which isn't a child of anything else. My thought was for 3rd I move the camera to the player location, rotate it, then offset it with move. When I want to go to first person my thought was move the camera to the player location, offset it with move, THEN rotate it in hopes that it would be rotating in the new over the shoulder position and not like in 3rd person. This however isn't what is happening. These both seem to be giving the same results. if self.zoomed == false then -- move the camera to the player self.entity:SetPosition(self.Character:GetPosition(true)) -- set the rotation of the camera self.entity:SetRotation(Vec3(self.cameraPitch, self.cameraYaw, 0), true) -- offset the camera self.entity:Move(self.xDistance, self.yDistance, -self.zDistance) else -- move the camera to the player self.entity:SetPosition(self.Character:GetPosition(true)) -- offset the camera self.entity:Move(self.xDistance, self.yDistance, -self.zDistance) [size=4] -- set the rotation of the camera[/size] self.entity:SetRotation(Vec3(self.cameraPitch, self.cameraYaw, 0), false) end
  12. That works. I wish it was done automatically behind the LE scene for us (as it would be a little cleaner for us) but this works too. Thanks.
  13. OK cool. Yeah, OnExit is really the biggest thing since we can just use a bool in our script inside OnCollide for an OnEnter.
  14. Where is the OnExit function script? I'll have to start looking at how to do this globally.
  15. When I'm in game the scale looks perfect to that character controller. Yougroove, the generated shape file works fine. It's more about the size of the model.
  16. I'll give it a try later in the week. I'll be away from home for Christmas. This would sort of suck if that's the case as it makes it that much harder to test all areas of a scene and making tweaks wouldn't give an instant visual feedback making it very tedious to tweak & test. Thanks Aggror.
  17. @flach You can make normal CSG and apply the invisible material to it and it'll do what you want. This is what I was doing for these buildings at first. However, it is a long and painful process to map out these buildings with CSG. It also has the same issues of surfaces needing to be bigger than you'd expect in order to get a navmesh on it. (Also there is a bug where if the CSG is a child of a model the navmesh won't be built on it. Without making the CSG a child your scene hierarchy gets pretty long) Those stairs in my picture are too narrow for the LE navmesh generator so it doesn't matter if I put it as CSG it'll never generate a path up them, yet the character controller for LE easily makes it up there with room to spare. I'd rather risk an AI getting stuck on something sometimes than not being able to go there at all. Hell, even in most AAA games the AI gets stuck on things sometimes.
  18. As you can see below the stairs and a large part of the top of the building aren't walkable by the navmesh. However with the player and the default character controller I'm able to walk up those stairs and get around on the building just fine. I feel like the parameters of the navmesh generation need to be tweaked to allow for more defined/tighter areas like these. All levels can't be big an blocky like HL.
  19. I should have specified it's like gears or war type of camera. You don't ever see the players face. When you rotate with the mouse the entire character rotates. When you shoot or aim it zooms in over the shoulder. Everything is looking decent it's just I don't know how to best handle diagonal movement. If I could get the bone rotation working I could at least try turning the hips 45 degrees and see how that looks, but I just feel like diagonal movement is awkward looking. In Lara Croft her body goes diagonally and then pushes the camera to be at her back again, but it doesn't feel right to me. I can't test it in a large open area to see how it looks when you do it for an extended period of time, which could/would be the case in a shooter, because there really are none in that game.
  20. I don't have any 3rd person games in my steam library atm, but what are some of the ways you guys have seen diagonal movement and animations in 3rd person done and which do you like? Currently I just keep playing the run forward animation but it creates a sliding effect that looks bad. I'm looking at turning the hips some in the direction (having issues with that though) but with the camera staying directly behind I get the sense that it might still look strange. Any ideas, thoughts around this?
  21. I have a project that was working fine until today in a certain area. I have a player script that has a public property at the top: Script.Camera = nil --Entity I have a camera object in my scene that is working fine. I drag that object into my players script Camera property. Then in my player script I call: self.Camera.script:ZoomIn() which was working fine all day yesterday, but today when it tries to run this it says 'attempt to index field 'Camera' (a nil value)'. However in the editor I see the camera in this property field. It shows it's there yet it's nil. I've removed it and readded but I get the same error. I would like to provide this project but it uses purchased models and I have no idea on how it happened so I can't reproduce in a demo project. Josh, if you want to take a look let me know how I can provide this project to you.
  22. Very nice! Looking good now.
  23. Rick

    Fog

    Thanks shadmar, it looks good. See those are the kinds of things snippets the wiki needs. I'll put this on there. Page added: http://leadwerks.wikidot.com/wiki:fog
  24. Rick

    Bone rotation

    Making a new post because if I edit the above the stupid code formatting goes away and I'm not indenting it again If I comment out the animation lines then the lower body does rotate. So I'm taking the assumption it's not rotating because of the animation.
  25. Rick

    Bone rotation

    I must be doing something wrong then. Here is the chunk of code I have. The idea is if I'm running forward and strafing, to rotate the hips. if self.moveDir == self.dir.Forward then if self.shooting == true then self.animMgr:SetAnimationSequence(self.seq.RunShoot, .5, 100) self.animMgr:SetAnimationSequence(self.seq.ShootStand, 3, 0, self.spine) else self.animMgr:SetAnimationSequence(self.seq.Run, .5, 100) end -- this might not be needed but it rotates hips when moving diagonally if self.strafeDir == self.dir.Left then self.hips:SetRotation(Vec3(0, -45, 0), false) elseif self.strafeDir == self.dir.Right then self.hips:SetRotation(Vec3(0, 45, 0), false) end end
×
×
  • Create New...