Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: is this a bug in tv3d  (Read 462 times)
naruto
Community Member
*
Posts: 45


« on: August 25, 2011, 05:20:54 PM »

in node system

when i try to make the node not walkable

PathFinder.SetNodeWeight(n, 512);

but nothing change

when i try 512 in grid system to make it unwalkable , it works well
but in node system
512 not work .... what is the problem .... is this a bug Huh?


so i use

PathFinder.EnableNode(n,false);

but this completely eliminates node from being traversed at, why my node wight doesn't change? as i understood 512 is for blocked tile, 0 is for walkable...
Logged
beyonder
Moderator
Community Member
*****
Posts: 463


« Reply #1 on: August 25, 2011, 07:25:00 PM »

Remember that node system takes into account collisions. If there is an object in front of your node it won't be "walkable".

Logged

"And what I saw scared me to the depths of my miserable soul. It was true, it was all a sham, it ain't real." - The Thirteenth Floor
naruto
Community Member
*
Posts: 45


« Reply #2 on: August 25, 2011, 09:54:40 PM »

umm... then how can i make node dislable

i have to actors move and when i change actor position ... then should i disable another node

is there any solution for this problem

because i can have non walkable area ... but if i want to change this area when i move Huh
Logged
beyonder
Moderator
Community Member
*****
Posts: 463


« Reply #3 on: August 25, 2011, 10:53:46 PM »

I'm not sure I understand you...

But, each mesh or actor has a collision flag.

Mesh.SetCollisionEnable

If you set it to false, the node system will not take it into account. If you set it to true it will.

You might also want to play around with.

TVAi.SetNodeSystemParameters

That will allow you to set the search radius.

I don't turn on and off nodes. I'm not sure why you are. I don't mess around with weights either.

If you have a tree and you want your character not to walk through it, make a simple cylinder or box and put it around the tree. You don't have to render the box or cylinder. Just set it's collision flag and the node system will find a path around it. Or just set the collision flag on the tree. This sometimes is too close for comfort though so I use a box. I also use collision walls around the areas where I don't want my character to walk.

Load in your meshes and set the collision flag first. Then init the Ai.
« Last Edit: August 25, 2011, 10:56:54 PM by beyonder » Logged

"And what I saw scared me to the depths of my miserable soul. It was true, it was all a sham, it ain't real." - The Thirteenth Floor
naruto
Community Member
*
Posts: 45


« Reply #4 on: August 28, 2011, 04:35:43 PM »

got it ... but if i want to move the actor ... the cube will move with him or what ??
that what i mean i want actor unwalkable ...

thanks for your help
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks