Gabers84
(Gabers)
December 17, 2022, 8:16pm
#1
In my Spider-Man game, when my player swings, it is kind of weird to have the player completely vertical throughout the swing. I want to move the character like he is swinging and rotate the player along the angle of the web.
This is what it looks like right now (my game)
And this is what I want it to look like (other Spider-Man game)
As you can see the player’s character moves with the web. I’m using invisible spring constraints for my webs with a beam for the web texture. Can someone help me achieve this?
1 Like
Try using my physics char controller and lower the drag friction attribute when swinging.
The issue seems to be caused by the default humanoid movement applying drag friction and hence has no momentum.
Just a small project that I initially made in 2-4 + hours purely for learning purposes that I wanted to share since I see not a lot of example projects for character controllers here on the dev forum the only one other being @EgoMoose platformer controller.
However soon later found out it was a lot of fun to play with and thought to modularize it further into a full blown project.
Objectives:
Similar to default humanoid controller movement running
Humanoid autorotate
Controllable fric…
Gabers84
(Gabers)
December 17, 2022, 11:29pm
#3
I don’t quite understand how this works with my problem.
The physics are fine, I just want the player to move with the web properly.
dthecoolest
(dthecoolest)
December 18, 2022, 12:45am
#4
Oh, I thought you wanted momentum since in your version after you stopped swinging the character just stopped.
For the orientation you can do this to align with the vector that is going from the character towards the web position.
Rather than trying to convert this up vector into an angle which is also complicated it’s better to leave it I would rather use @EgoMoose advanced CFrame technique to leave it in terms of vectors.
We can obtain a CFrame rotation to align the current persons “UpVector” to the new surface upvector. Here is an example script and video.
The advantage of this method is that it will allow you to rotate along the new upVector without having to specify a right vector as a CFrame.fromMatrix solution.
…
1 Like