Mario style 3D platformer!

I’d love to create a 3D platformer.

1 Like

I love super mario too.
I try to create a simple prototype,But I find some hard question to overcome so far .

(1) In super mario 3D world when mario jump near the question box being close to the wall, he is not be bounced from wall.
But when I use add force to my player , It could happen.

(2) Avoid player getting stuck when touching other collider like wall.

At the first time, I try overcome this issue by coding.
I can Slide over the wall by modify diretion of moveVector to overcome this issue.
until I encountered a problem. the problem is when mario jumps and touch the question box , he will move up to the highest point anyway. This is beyond my ability, Even if I tried some ways.
Finally I use physics material. my player and wall are no friction , the ground is using default.

(3)When my player jump under the question box ,but he is not under the center of box. Because player is using capsule collider , so when he jumps , he could slip from the box sometimes.At that moment his capsule collider touch the trigger under question box too.(the trigger is for dertermining if hit a box)

(4)Moving along slope
I find in super mario 3D world , mario is on flat ground as quick as on slope. But in Unity when you move your player along slop (this is meaning the moving Force apply to player is parallel to slope and at the same time Gravity applys to player too), he will move up slowly and move down quickly.(2 Force)

In this case,I separate the gravity to 2 component, A is along with slope and B is Perpendicular to slope.
I think slope exert reaction Force to player .(this force is equal to B and its direction is negative to B)
So If you move on flat gound using Force (X),now you should move down on slop using (X-A),you should move up on slop using (X+A).

Although In the case of different slopes, the strength of friction Force is not the same , but this method Looks okay in some situation.

Hope these information is useful for somebody want to create mario.
And Hope somebody tell me how to overcome.
(Please tolerate my English is not good)

Privacy & Terms