Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: DocLogic on May 31, 2015, 05:25:49 PM
-
Hey, I'm having a bit of trouble just simply reducing the fall speed of my character. Not using a rigidbody. Using this First Person Drifter Controller (http://torahhorse.com/first-person-drifter-controller-for-unity3d).
I tried using Set Property to play with the Gravity setting on the FPS Drifter Script (while not grounded and holding jump), but it only really working if hold jump before reaching the apex of the jump. Doesnt work when just coming back down.
I tried adding a rigidbody, get velocity of the Y axis, multiply that float by 0.25, and then set velocity on the Y axis, but that doesnt seem to work either.
Whats the best way to approach this?
-
Other things I tried when holding jump while "not grounded" (none of these worked):
- add gravity to rigidbody, add force on Y axis
- Get position, add to Y variable, Set position (just teleports, no smooth movement)
- Move towards in Y direction
- Put gameobject above characters head, "movetowards" gameobject
Ive tried other FPS Controllers, but they are less flexible in allowing me to change some of the runspeed and jumpheight variables through the "get property" function.
I want a character who builds up speed based on how long you hold down the run button, with the jump height increasing based on your speed. I can do all this, its just glide thats giving me a hard time.
Thanks!
-
Sort of a solution:
if (Input.GetButton("Jump")){
moveDirection.y = GlideSpeed;
}
I set the GlideSpeed to -5, so the player just slowly moves downward when holding jump. The only problem if you just jumped, and are moving upwards, then press glide, you will instantly start gliding downwards.
-
Could you do a check on the velocity.y & when it is <0 then apply your drift regardless of whether they are pressing jump or not?