duncan
31-01-2011 10:13:46
I want to let the player pass through enemies freely.
I used player controller class for player.
I have set the material for player and monster and
mMatPairPlayerMonster = new MaterialPair( mWorld, mMatPlayer,mMatMonster );
mMatPairPlayerMonster->setDefaultCollidable(0);
there are no force acting on them already but the enemy blocks the road of the player...
How could i solve this problem..?
Thanks for your help!!
duncan
31-01-2011 10:38:14
when the player overlap with the enemy, the player will raise up and stand on the enemy...
I dont know if it is the stair effect of the player controller.
Yes that's the stair effect of the player controller I had that problem before.
I setup the stairs effect to the minimum, try this:
OgreNewt::PlayerController *mPlayerController = new OgreNewt::PlayerController(body, 0.0000001f);
By the way do you have any problem when you turn around the camera, for example rotating the camera around or when you restrict the pitch?
I don't use 0.0f for stairs factor because when you try to use the body debugger it gives a memory error.
If you need i can post here my code.
duncan
15-02-2011 02:45:26
Thanks for your help majc.
It is the problem of stair effect.
But even set this smallest value for stair effect, if i jump the player, the enemy would still block the player or the player would stand on the monster. Besides, player would be easily stuck at some places eventually and cannot walk upstair.
Would you mind posting this part of code here?
anyway thx again.
duncan
15-02-2011 04:01:21
Besides that, i also want to ask about what should be used for controlling the movement of monster.
There are several ways such as player controller,force callback,etc.... Which way is possible??
I'm trying to use player controller for monsters....Thanks
I'm using player controller also but i used to use force callback before this version of newton, i found a filter of bodies to don't collide with a specific bodie in one of the ogrenewt examples, I didn't have time to search for it but i will have to implement that too, who find first post here
duncan
03-03-2011 04:34:34
i still cannot let a player smoothly pass through a monster because of player controller stair effect.... anyone has suggestion about it...?
duncan
25-04-2011 03:59:34