Snap player to rails (Like THPS, Sonic Adventure 2, or Infamous)
Trying to figure out how to have a player jump onto a rail and snap to it and move forward. Something similar to grinding in Tony Hawk, Sonic Aventure or Infamous.
Currently, I've got my character setup where it can detect different surfaces. So if the player is on the ground they have specific controls for ground movement. If they come into contact with a rail they move forward, can lean left or right, and jump.
My problem is when the player jumps onto a rail, it moves forward at whatever angle it landed at and can slide right off.
Any ideas?
-
Well done on getting it working so far!
I'd probably use a follower that moves towards a tag. Add a tag to the bottom of that rail, and have the tag turn on when you're grinding on that rail. -
Random idea but how about a mixture of force appliers? You could run a force applier along the rail which pulls the player in, maybe even even restrict it to 2 axis' so that horizontal movement is still possible
-
'@iamdoodlebug: Tried the force appliers but it just kept throwing my guy around. Might need to adjust it a bit. Thanks for the suggestion!
@supposer been messing with followers and tags. Trying to figure out the best way to get it attached to my puppet and get it to follow along the contours of the rail. Thanks for the suggestion! -
Cool. A tip about followers is that it has a white gizmo thing you can see while the follower is selected or its tweak menu is open. That is the spot (relative to the gadget) it tries to drag to the target position.
-
I guess you can try to modify the method that is used for some simple AI that keeps character following some paths and avoiding the walls.
This is done by laser scopes that are checking if you are getting close to the wall from right or left side and are connected to the rotators to change the direction of the character to avoid the wall.
You could basicall reverse the system. Using two scopes checking the place in form of the character. And if he would fall on one side from the rail, then rotate him.
This may not work on very narrow rails. But you can alwas make them wider, but keep only the middle part visible.
iniciar sessão para comentar.