Swinging animation and mechanism in a game

hi i have been working on a game for exploration for some time now and have gotten my character to jump and walk aroundhttps://playcanvas.com/editor/project/917467 ,however i want to take it to the next level by adding a swinging mechanism,like spiderman.however,after only starting a week back,and have gone through tonnes of different videos i am stil confused.do you have any tips for someone who only started a week back?also he dosent need to swing from a certain thing just from the sky.also the controls for the game are wasd and space

Hi @anakin_Skywalker! I’m not sure what you mean with swinging. If you mean swinging on a rope, I have no idea how to achieve this. If you mean jumping around, you can do this with raycasts. In one of my own projects I created the abiltity to jump on walls. You can do a forward raycast from the player and if this raycast detect a wall, you stop the jump and keep the position. Sounds easy, but requires the necessary knowledge and time.

i think he means like a grappling hook, but more like spidermans web shooting mechanism

hi albertos,im not really sure what you mean by raycast but more of a grappling hook, like in the game just cause.

A raycast is basically an invisible grappling hook to detect if you hit an object or not.

You can make this invisible grappling hook visible by drawing a line from the start point to end point of your raycast.

1 Like

Hello @Albertos, I am new to this platform. I noticed that you mentioned the ability to jump on walls in one of your games. Currently, I am working on developing a game based on the Marvel superhero, Spiderman. My goals for this game are pretty straightforward when they are said out loud, but when it comes to coding, it can be quite challenging. Here are my main goals for the game:

  1. Web swinging/Swinging on a rope(Does not need to swing from certain things it can just be the sky but if necessary then swing from certain things.)
  2. Wall walking/running (Ability to walk along walls)
  3. Air tricks (If falling a button can be pressed and character will do flips or spins)

Hi @Rofather2022 and welcome!

Unfortunately, I haven’t made the things you mentioned myself.

I suggest to take a look at the topic of @Literally_Kirby.

1 Like

Okay, Thank you for the information I will try to reach out to @Literally_Kirby for more info or possibly to collaborate with them and create a game together, if not then most likely to get some help!

1 Like

I’m working on my own game right now but I’m more than willing to help with movement if you do need help with anything!

Okay! Thank you for letting me know.