Jump to content

Joshua

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by Joshua

  1. Is it possible to perform a single raycast (Pick Event) and return a collection of pointers to intersected Entities by using the available pickevent? From my understanding, the current pickevent will either return a single pointer to the closest intersection result, or the first intersection result found. The only way that I can think of to do this would be to implement a recursive raycast in which the pickevent would return the closest intersection between p0 and p1, then do another pickevent using p1 as p0 and using a new point as p1. The method would continue in a similar fashion until there was no intersection between the raycast and an entity. I think this method would work, however it seems very daunting and may create a lot of overhead to perform one raycast. I understand that the current pickevent has a recursive parameter, however I believe that the recursive method, if true, will recurse inside the Entities Hierarchy and not past the initial intersected entity. Please advise.
  2. Thank you Josh. Leadwerks 3.0 loaded right up after the file was deleted.
  3. I was trying to open my Leadwerks 3.0 Editor and I received an Exception Access Violation when it started loading the 'grid.shader' file. I do have a copy of Leadwerks 3.1 under Steam which is installed under the steamApps directory. My initial install directory for Leadwerks 3.0 is in the root directory of my (E:) partition. Both editions were working earlier today so I am unsure what the problem might be. I was not using the Leadwerks editor of either version prior to the error. I was programming my project from within Visual Studios 2010 Ultimate Edition. I have never tired running both editions at the same time. I have noticed that sometimes Leadwerks 3.1 under Steam will try and access the files/projects from the Leadwerks 3.0 directory but usually it results in a message box displaying the editor is unable to load the project. I looked for a possible .log file within the Leadwerks 3.0 directory that might contain any error reports but could not find one. I will try repatching the Leadwerks 3.0 installer with the Leadwerks 3.0 Updater later this evening to see if it resolves my problem. Please let me know if there is anything further information I can supply.
  4. I actually think the best method would be to apply the raycast to my previous method. To adjust the method, I would preform a raycast a maximum view distance from the NPC's forward direction. I would then check for any collision with scene objects and adjust the far plane to be just before the location of the collision. Using a position just before the collision would prevent any abnormal detection for example, if the player was pressed up on the other side of the wall. I think the use of planes is better then just using a raycast because we want to check a certain area for a player and an exact position is not needed right away. For example, I would check if there is a PlayerObject within the visible region of the NPC. If true, I would poll for the PlayerObject's position and through the use of the Vec3 class I would get the distance to\angle to etc and run any game logic from there.
  5. I would suggest you use three Plane objects. Project two planes(YZ) outward from your NPC's forward direction at the appropriate angles. then, create the third plane(YX) that is parallel to the NPC's forward direction at a specified distance away from the player, effectively creating an enclosed triangle. You would then check to see if the player is inside the enclosed triangle. Best of Luck!
  6. For iron sights, you can use a couple Vec3 or Mat4 to represent a m_weaponOffset and m_weaponOffsetRotation while idle and while aiming. you could then use Math::Curve(..) to interpolate between the offsets to allow a smooth transition between the two positions/rotations. For crouching, you can have a bool m_isCrouching value to indicate if the player is crouching, say if Key::ControlKey is pressed. If the player is crouching you set something like m_playerHeight to something like m_crouchHeight and position your camera accordingly. My code is in C++ but I am sure it can easily be translated to Lua. crouching ex. // Check for crouching. m_isCrouching = window->KeyDown(Key::ControlKey); // Set height appropriately SetHeight(( m_isCrouching ? m_crouchHeight : m_standHeight)); // Get a pointer to the game's camera Camera* gameCamera = GetCamera(); // Get the existing camera's position Vec3 newCamPos = gameCamera->GetPosition(); // set the new camera position and smooth the y-Position newCamPos = Vec3(GetPosition().x, Math::Curve(GetPosition().y + GetHeight(), gameCamera->GetPosition().y, m_viewSmoothing), GetPosition().z); // apply the final results to the viewing camera gameCamera->SetPosition(newCamPos);
  7. Ahh alright. Thank you for the hasty reply!
  8. When the Steam Leadwerks 3.1 Indie Edition went live, several old tutorials were removed from the 'Tutorials' section of the Leadwerks Website. Is it at all possible to get access to them or are they removed indefinitely?
  9. I assume the delay is being caused by some trouble with the launch on the Steam client. We must unfortunately be patient a little while longer.
  10. Is there a way to get the handle of the application instance in Leadwerks 3.0? I would think that this would be under the System class or through the template App class but I see no official documentation in the command reference. I also have been unable to find anything similar in other class documentation, or in existing threads on the forum.
  11. Joshua

    pushing

    It is my assumption that a CharacterController is considered an 'infinite-mass' object which would prevent any external force from being applied to it or, the SetInput(...) method will negate any forces applied to the object because the SetInput(...) uses the objects position, rotation etc. What you might be able to do is use the SetInput(...) method and incorporate applied-forces into the method. Doing something like this should allow you to still apply forces without changing the character controller, or modifying the mass of the object.
  12. I just updated Leadwerks 3.0 to the current version. As soon as I selected the 'create' button under the Terrain tab, Leadwerks threw a 'EXCEPTION_ACCESS_VIOLATION' window. After clicking OK, Leadwerks closes. I am unsure of any required files needed. I have attached a screenshot of the message I received.
  13. I have found working a full time job ex. 6am to 5pm Monday through Friday with a one hour commute time both ways does not leave adequate time for any sort of successful development. I will definitely post my project to the asset store once complete but half completed core components is not worthy of entry. Best of luck!
  14. My project completely changed. I hope I can get the main system completed tomorrow!
  15. I have noticed that the days have been passing by way too fast. That being said, today is a BIG development day after work. Fingers crossed for productivity! I hope everyone is still doing well!
  16. I just finalized the concept for my project. I Fleshed out the specifics last night and started modeling in Blender this morning!
  17. Wonderful and thank you! I cannot wait to see everyone's project at the end of the competition. Best of luck to all!
  18. I noticed that the tournament started yesterday and was wondering, is it too late to enter?
×
×
  • Create New...