Toribash
Original Post
Unity game moving platform + respawning troubles
[Using Unity 5.3.1 Personal Edition]
For anyone that wants to test it out for himself: http://www.mediafire.com/download/3k...tched+game.exe

So I've made a 2D platformer game with moving platforms and respawning if you've fallen off the map.

My problem is, that when I respawn the passenger mask on my moving platform doesn't work anymore (the passenger mask makes the player move along with the platform, so basically I'll fall through a platform that's moving upward).

I have assigned the correct tags/layers to all my platforms and player, I'm using "Environment" for the platforms and "Player" for the player.
Oh and I'll give you all my TC and/or a kiss if you find a way for me to fix this

PlatformController Script



Player script



GameMaster script



RaycastController script



Controller2D script



Camera2DFollow script

Last edited by dank; Feb 12, 2016 at 12:22 AM.
dreamy suicide act
Just so I understand

In Controller2D script
-> Method void VerticalCollisions

What is being checked/achieved here

It lets me jump on a platform above me by going through it, as well as letting me fall through platforms when pressing arrow down.
I'll check if removing that snippet helps, didn't think about that part before.

Thanks for the response anyway.



Removing the snippet had no effect on my game, other than that the through tag didn't work.
Last edited by dank; Feb 13, 2016 at 06:46 PM.
dreamy suicide act
Vector3 CalculatePlatformMovement()
under here it's being calculated, I set it so that I can adjust the value in the inspector though.

also I've got no idea what the second part means.
dreamy suicide act
I've removed it from my game, since I really didn't know how to fix it and it was due for today.
Now there's only horizontally moving platforms.

If you're interested in playing a demo for my game you can try it here (yea it actually works this time): https://www.mediafire.com/?o8f2806b9bods6q

Controls



Feel free to give me suggestions.
dreamy suicide act
Originally Posted by ImmortalPig View Post
Maybe hide cursor while ingame :P It's actually pretty nice without being moved by the platforms.

I noticed sometimes there are some lips on slopes (after the second moving platform on lvl 1 for example), maybe try clean them up so it's smoother.

I might try to hide the cursor yea, were you able to go through the level exit by pressing W by the way?
Somehow it didn't work on my friend's pc even though it worked on mine.

Also I'm not sure why you're getting stuck behind the edge on the slope, thought I'd fixed that already.
dreamy suicide act