- Home /
Using rays to spider climb fluidly in 2D
Hello all,
I need some help. I am working on a 2D platformer with a character that can climb. I had designed my own system but it ended up very glitchy. I felt like it would be a better idea to scour the internet some more and see what others had done. I found an idea playing with raycasts (my system had used triggers). I like the raycast idea and I understand it mostly. However, before I spend way more time on it and find that it doesn't work I was wondering if some of you might be able to help me.
I tried using the code in this post. https://answers.unity.com/questions/468330/character-that-climbs-everything-including-on-ceil.html
But could not get it to move the character at all, not sure what I was doing wrong. Now I am playing with this code.
http://www.asteroidbase.com/devlog/7-learning-how-to-walk/
I can see that I need a class called TerrainMovementRayProperties with a few variables. However, I am not exactly sure when it should be called and executed to accept player input. The end of the DoubleRayCastDown function is also throwing an error about needing the out rightHitInfo parameter being assigned before leaving current method.
Your answer
Follow this Question
Related Questions
Using a timer in conjunction with two push buttons from Arduino input 1 Answer
Unity 2D character can slightly go through wall. 0 Answers
Player movement script based on a given symmetry 0 Answers
Player character moves downwards in top-down game,Player goes down continously 0 Answers
Unity2D Parallax Scrolling approach concern -1 Answers