Actor doesn't fall at the edge of platform.
bluethunder
Member Posts: 33
Sorry if I didn't elaborate clearly in my following description.
I have an actor running on the platform but at the edge of the platform which the actor suppose to fall off, the actor doesn't fell off and it will only fall off when the actor is few pixel away from the edge. It looks rather strange that the actor looks like walking on thin air.
I believe it is due to the rectangle block which is still in contact with the platform edge, hence it is not falling off. But I have imported an image to the rectangle box so the box is not seen.
How do I solve this issue?
Thanks for helping.
I have an actor running on the platform but at the edge of the platform which the actor suppose to fall off, the actor doesn't fell off and it will only fall off when the actor is few pixel away from the edge. It looks rather strange that the actor looks like walking on thin air.
I believe it is due to the rectangle block which is still in contact with the platform edge, hence it is not falling off. But I have imported an image to the rectangle box so the box is not seen.
How do I solve this issue?
Thanks for helping.
Comments
Make the invisible actor a bit smaller than the ground actor, and lower, so it looks like he's running on the platform and that should do the trick
Hope this helps and clarify if you need to
Did you mean to make an invisible actor smaller and stay on top of the ground platform?
The actor will run on it and it will fall when he is no more on the invisible actor?
For example, the length of the ground is 100pxs so I make the invisible actor 90pxs (45pxs to the left and 45pxs to the right). So when the edge of the actor steps on the 46th pxs, it should fall off.
Am I correct on the above illustration?
Once again, thank you for the wonderful help.
Appreciate and grateful.
I did not turn on the gravity. The actor has behavior of moving down when it is not on any solid platform. The actor could run, jump and fall.
Any better help much appreciate.
Thank you.
You can even go less, for example on my platformer, I make the invisible ground actor about 1/3 or 1/4 shorter than the height of the ground actor, and the width, I usually allow for about 5-10 pixels less on each side, but it's all a matter of preference. I personally liked the way it looked.
Also another tip, it's much better to place gravity on the running actor (player) himself than the scene. It's much less of a hassle when dealing with enemies and such.
In order to do that, just use "accelerate" down and tweak the speed to your taste.
I have set the main actor with accelerate downward action.
With your suggestion, I will try when I return home from work tonight.
I will post again should I need more help.
The other stuff which make me headache is the so called "AI" of the enemy. Based on each level difficulty, the enemy actor will become cleverer.
Since GS does not have AI in place, wonder how to make the enemy to be clever enough to do action when it sees the main actor (good guy actor).
More invisible actors to trigger? I guess. May I right?
Thank you.
If you need any help, don't hesitate to ask! Platformers are ridiculously hard, but rewarding to make