This is where fixed bugs can be seen. Please do not post new bugs into this forum, it is purely to see what has been fixed and most topics will be locked.

navmesh and ray bugs

navmesh and ray bugs

Postby ant0N » 18 Mar 2015, 18:00

if you walk around navmesh agent, he will go in the opposite direction.


ray gets stuck at the starting point. (although this is not a bug, but how to solve it?)
Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller

Re: navmesh and ray bugs

Postby SolarPortal » 18 Mar 2015, 19:10

Try activating the navmesh agent debug.
Code: Select all
navmesh.showAgentDebug(objID, 1);  -- 1 is for active

This will show a green sphere in the scene, which at the center of the sphere is the agents current position. A better debug will be made as we improve the system. ;)

What i can see is the character is slow at turning and the actual agent has already got to you which stops the character entity moving. Try changing your rotation and movement speeds.
For now, the movement will be wobbly, which then smooths out as they move. This is a planned in upgrade already :)
I mentioned the character steering being wobbly in the navmesh development topic. :)

As for the raycast being stopped by the players capsule(starting point) , this can be fixed by a couple of ways:

  • The first and best use of the system case, is to change the querygroups character controller.
    - Select your enemy.
    - In the "SCC" properties, goto "SCC Flags" > "SCC Query Flags", press the button.
    - Set a flag other than 0. Make sure to un-check 0 as that is the default value all physics objects have.
    -- Open the lua script, go to your raycast function. There is an extra optional argument that you are not using yet which is the query flag. just put 0, as the default is -1 meaning hit every physics target. Now only physics with query flag 0 will be hit.
    Since you set the Enemy AI character to query flag 8, the raycast will go through them.

    Code: Select all
    physics.rayFromPoint(rayID, x,y,z,qw,qx,qy,qz,range, 0); -- the 0 is the optional query flag.
  • The other way of dealing with it, so you don't have to play with query flags( which are the best way of doing it :P ) is simply to offset the position. The code module in the panel for raycast from object shows how to do this.

    Code: Select all
    x,y,z = entity.getPosition(obj)
    dx,dy,dz = entity.getLocalOrientationByAxis( obj, 0,0,1 ); -- get direction for the entity.
    qw,qx,qy,qz = entity.getWorldOrientation(obj) -- get the rotation
    x=x+(dx*RadiusOffset);
    y=y+(dy*RadiusOffset) + 0.5; -- offset from center based on rotation
    z=z+(dz*RadiusOffset);
    hitID,pox,posy,posz = physics.rayFromPoint(rayID, x,y,z,qw,qx,qy,qz,range,0);

Once you have played with query flags, it opens up a lot of possibilities.
We also have Collision Flags, which allows physics objects to pass through each other.

Hope this helps :D
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: navmesh and ray bugs

Postby ant0N » 20 Mar 2015, 17:40

Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller

Re: navmesh and ray bugs

Postby SolarPortal » 20 Mar 2015, 17:54

yes, as i expected. The rotations on the characters are too slow to keep up with the navmesh agent movement and rotations.
The character movement that follows the navmesh agent needs to be more exact and i will work on this some more soon, to make it much better.

For now, speed the rotation speed up of the characters as i feel this is why they cannot keep up. The agent is turning quickly and keeping up close and the characters are turning slowly separating the nav agent and physics controller.
However, when sped up, they will wobble as they steer. But this cannot be helped for now until i can get to the next section of navmesh development.

Basically, the current steering system is: The navmesh agent moves along the path found by the navmesh to the destination specified. The physics Controller then uses the steering algorithm that is used for spline path steering to chase after the navmesh agent, when the rotations and speed are matched. It looks like the physics controller is moving along the navmesh path.

Hope this information helps :)

BTW: Scene is starting to look cool :P
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer


Return to Fixed Bugs

Who is online

Users browsing this forum: No registered users and 3 guests