Topic: Help with creating multiple platforms?

Im having an issue when creating a stage with multiple platforms and I was hoping you can help me solve it. My project is due soon so I'm a little desperate D:

From WHat I can see I need to modify the PhysicsScript

The isGRounded () function specifically I believe.

The issue is I'm not exactly sure what you are doing in it. If I removed the line

Code: 
if (transform.position.y != 0) transform.Translate(new Vector3(0, -transform.position.y, 0));

            return true;

I can land on other platforms but some of my attacks dont work as expected on the enemy. Also even the act of landing on the platforms doesnt work perfectly.

Correct me if I'm wrong but there is somewhere in the code that keeps the player at the spot y = 0. Because if I try to jump up to a platform without modifying any code the player is automatically brought back down.

Thanks for the all the help. This is probably one of the most important parts of my game so ANY help would be appreciated.

Share

Thumbs up Thumbs down