- Home /
Platform, not detecting collision when applying a translation
Hi, I'm curently making a 2D runner game. In order to solve some problems I had with my previous version, I made some modification. Instead of having my character moving on the X axis, it is my platform that are translating on the opposite direction. The problem is that when I do this, the platform doesn't detect the collision anymore. Any ideas how to solve this problem? Thanks in advance.
Answer by Vitor_r · Mar 24, 2014 at 05:56 PM
If you are using "Translate" or "transform.position = newPosition" in your plataforms, they will not launch collision events. You will have to use rigidBody.addForce or velocity for this.
My opinion about your "modification", i think that moving all the plataforms instead of just one player is wrong, you will be moving a lot of physic bodies and using a lot of processing time for this. Maybe the previous version didn't work because u was doing something wrong.
gl
Answer by Francsois114 · Mar 24, 2014 at 06:24 PM
Thanks for the tip, you are probably right. I moved back to my old version, and try something else for the parallax.
No prolbem, if u want to do a paralax background this is a good tutorial www.youtube.com/watch?v=9bhkH7mtFN$$anonymous$$ And mark the question as answered please.
Thanks and good luck with your game.
Your answer
Follow this Question
Related Questions
Detect if ball is on a platform or if it fell 4 Answers
Very fast objects and collision detect + Optimize issue 1 Answer
Publish Error 2 Answers
Again about the platforms... 0 Answers