Posted June 20, 201510 yr In the constructor of my Carentity i have set the StepHeight to 1.0f. But when it collides with a block, the entity does not get up. What do i have to do else?
June 21, 201510 yr I think the stepHeight is used by pathfinding code in the navigator. If you're controlling the movement directly I think you'd have to process the steps yourself -- like if you know that the entity wants to go in a certain direction where there is a block in the way, check that there is room above the block for your entity and move it up. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
June 21, 201510 yr Author Yea, i tried doing it like that with doesBlockExist and then sin(rotationYaw*PI/180) etc but it wouldn't work properly. Do you have any suggestion?
June 21, 201510 yr Well rotating the yaw will help it look better going up a hill, but if you look how vanilla mobs go up and down it is more of just a jump. Again it depends on your movement code -- if your code actually checks the yaw direction and will move it upwards when yaw is rotated then it might work. But I think it would be hard to get the math just right. Instead I'm saying if you come up to a block and the movement code wants to go into it, you move it but also move it to top of that block. Not a rotation but actual movement. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.