Support Tickets

Attached to Project: Support Tickets
Opened by Developers - 07.02.2018
Last edited by Hannah Young - 17.03.2018

FS#2 - Navmesh for character not working.

A character with Lua script using navmesh to movedoesn’t work.
The character doesn’t follow navmesh to destination position.

Some hack seems to work , but i couldn’t get the hack work, a bug fix having navmesh working as intended would be better.

Closed by  Hannah Young
17.03.2018 21:52
Reason for closing:  Fixed
Additional comments about closing:  

New melee class has full navmesh chase, nevmesh random waypoint and navmesh follow path

Admin
Developers commented on 07.02.2018 15:34

Have tried this code with a single tile navmesh and it works.

obj = 0;
move =1;
x, y, z =0;
stopped = true;

function onInit(objID)
	obj = objID;
end

function postInit()
	navmesh.addEntity(obj);
	navmesh.showAgentDebug(obj, 1);
	navmesh.setAgentMaxSpeed(obj, 5);
end

function onUpdate(timeDelta)
	if( navmesh.isDestinationReached(obj) ==1 and stopped == false)then
		navmesh.setAgentControlled(obj,0);
		anim.playAnimation(obj, anim.getFromMap(obj, "Idle1"),30,1);
		stopped = true;
	end
end

function clickDestination()
	stopped = false;
	navmesh.setAgentControlled(obj,1);
	x,y,z = sky.raycastToCursor();
	navmesh.setDestination(obj, x, y, z);
	anim.playAnimation(obj, anim.getFromMap(obj, "Run"),30,1);
end

function onMouseDown( button, x, y )
	clickDestination()
end 
Admin
Developers commented on 07.02.2018 15:35

Couple of bug fixes done, currently not the movement, but:

Calling isDestinationReached() in lua before setting a destination would crash.
Loading a scene that used Single navmesh mode, would generate an incorrect navmesh.
Loading a scene with tiled navmesh after a scene with single navmesh would crash.

Admin
Hannah Young commented on 07.02.2018 15:46

we have found that there is an error loading back a navmesh with type: "Single Navmesh", best to use tiled navmesh for now :)

SpiderMack commented on 18.02.2018 00:01

With tile navmesh and last update, navmesh navigation works with some object character.
If i add a SCC to the character , navmesh goes weird and doesn't work.

No navmesh, no game possible :(

    obj = 0;

    -- System initialisation - Skyline script entry point
    function onInit(objID)
       sky.lprint("LUA: Script Active!");
       obj = objID;
    end

    -- Called after all the scenes onInit() have been called.If you need to ensure your data exits, then do you set up here
    function postInit()
		navmesh.addEntity(obj);
		navmesh.showAgentDebug(obj,1);
		navmesh.setAgentMaxSpeed(obj, 10);
		local pos = newType.vec3(entity.getPosition(entity.getIDFromTag("Player")));
		navmesh.setDestination(obj, pos.x,pos.y,pos.z);
    end

    -- Updated every frame
    function onUpdate(timeDelta)
       if (navmesh.isDestinationReached(obj)==1) then
          navmesh.setAgentControlled(obj,0);
       end
    end

https://s17.postimg.org/ukzahpvrz/navmesh_Bug.jpg

Admin
Jayce Young commented on 18.02.2018 11:57

What about the demos in the start screen as these work with the dev and installed builds:

Please note: that we are still looking into this issue :)
The last update was mainly for the other versions to be released and a couple changes.
Next we will be focusing on the critical bugs

SpiderMack commented on 18.02.2018 14:40

Did you read my previous post ?

"With tile navmesh and last update, navmesh navigation works with some object character.
If i add a SCC to the character , navmesh goes weird and doesn't work."

I re explain it :

1) Navmesh works ONLY when there is NO PHYSICS attached to your character.

2) If you add a Physic capsule or physic object to your character, Navmesh doesn't work and your character will go weird running around.

To resume, without physics collisions :

How to avoid your 30 zombie in game to overlap when they move ?
How to avoid they overlap staying at same position around the player ?
How to detect collisions between characters or do raycast to zombies if they don't have any collisions ?
How to have characters using navmesh able to collision with physic objects the player throws ?
How to have characters with navmesh not moving able react to physic orces or impacts the player send ?

Navmesh NOT WORKING WITH PHYSICS COLLISIONS is useless as it is.

I don't know how it is coded behind the scene, but Navmesh should override Physics position and cancel any linear or angular velocity when it's moving. While physics movement or rotation will react when navmesh is not moving.

Also Skyline would need the ability to add Collision volumes without RigidBodies for objects using navmesh.

Loading...

Available keyboard shortcuts

Ticketlist

Ticket Details

Ticket Editing