1 decade ago
by Nathre
Hello everyone!
I have a question about an entity (such as player) on a mover :s
As you have already seen, in Biolab, when the the player is on a mover, everytime you go up and move left or right, the player jumps. Same happends when you come from the left or right to go down.
Same happens to me :(
Any idea about how to solve this problem?
1 decade ago
by Jerczu
I solved it at some point - in your player entity define:
collideWith:function(other,axis){
if(other instanceof EntityMover){
//start different animation of your entity
//have a play with the settings
}
}
It is not perfect - the jump/fall animation starts when your player entity velocity Y is larger or smaller than 0.
1 decade ago
by Nathre
Sorry about my english, I think I didn't explain myself pretty well. Yes, I already solved that but what I meant it's about the physics... When the mover reaches the highest void to go left or right and also when it goes down, the player jumps. The problem comes when your mover' speed is beyond 40. When the mover reaches the highest void or is in the highest void to go down, the player jumps or fall for a second (with speed at 60) making You lose control on him.
1 decade ago
by Jerczu
Hmmm I did notice that but never thought of it as an issue... Why don't you try to force velocity y = 0 on your player entity - I didn't look into the code so this is just a guesswork.
1 decade ago
by Jerczu
You could always mess about with mover entity and slow it down to when it gets close to a void entity. I'm pretty sure you will find an answer if you study the code for these entities.
Page 1 of 1
« first
« previous
next ›
last »