What is the best way to script Spider man web swing?
Like this game:THIS NEW UP-AND-COMING SPIDERMAN GAME IS INSANE! (SPIDERMAN 2099) - YouTube
What is the best way to script Spider man web swing?
Like this game:THIS NEW UP-AND-COMING SPIDERMAN GAME IS INSANE! (SPIDERMAN 2099) - YouTube
Using springs and body forces/vector forces for the swings.
what exactly do you mean by springs?
Spring constraints, I used them for my very trash spider-man web swinging game, and it works well with vector forces (or body forces, i forgot which one)
Could I take a look at your web swinging if you dont mind?
Sure, its kinda broken in multiplayer and the forces are super unnatural but heres the link, you can download it into studio using the 3 dots at the top.
Follow this series by B Ricey. I made a Spiderman Swinging game following this tutorial, and it turned out epic.
Here’s the video:
Here’s the game I made with this tutorial:
Can I check it out if you dont mind
Just realized the spawn location is under the map LOL, lemme fix it, then you can try it out ingame.
edit: i fixed it.
Very fun to play! Good job.
Do you mind if you make it uncopylocked so I can see your code? It’s fine if you don’t want to, just curious.
I don’t know how and I’m planning to turn it into a full game, so I won’t, but if I don’t, I will make it uncopylocked (when I figure out how).
I’ll be back in a few minutes, so I won’t reply soon. Thanks.
That isnt really spiderman web swinging though, thats more just grappling to a point, when sipderman swings his web it anchors to a certain point and hes able to pivot around that point
Alright. Good luck with the game! Let me know if the game didn’t go as planned and I’ll help ya figure out how.
I can pivot in the game. Also does it not anchor to a certain point? You are able to move around like spider man when you get momentum aswell.
I made the game in the video you linked (the animations and scripting). I used an “algorithm” to pick out the ideal swing point which you can learn about here (entire presentation is great, some of it is more difficult to do in Roblox so you may have to do things a bit differently), or you can just use ray casting on where ever the camera/mouse is looking.
After you have the swing point, I use a rope constraint and set the WalkSpeed to the player’s fall speed (Use math.clamp for this to avoid getting too slow or too fast) as described in the presentation. Roblox will automatically accelerate your character on the Rope Constraint to your walkspeed. Alternatively if you want it to be a bit more physically accurate, you can instead switch the character’s humanoid state to “Physics” which turns off a few things, and if you’re fine with fine tuning stuff, add a simple vector force in the direction of the camera or humanoid move direction.
Beyond that you add an alignorientation, look into vector crossing, to keep the player aligned with the web.
I also did a lot of the other assists that are mentioned in the presentation, like keeping the player above the ground and even some light steer assist, but I think that’d be a bit too much to explain. Maybe some day I’ll make an in-depth post about it, I’ve been “studying” how to do web swinging nicely on Roblox for basically a year at this point.
Well, then make the web getting shorter go slower.
Oh,Great your game is superb,Thanks for your reply.
I would be able to make a working example of swinging using ropes and deactivation of the Humanoid. However that is a hard process.
What do you mean by fallspeed when you say you set the humanoids walkspeed to fallspeed? do you mean their assemblylinearvelocities y value?
Sorry, yes, by fall speed i mean the y part of assemblylinearvelocity