playMaker

Author Topic: 2 Jumping issues.  (Read 1497 times)

xxltnt

  • Playmaker Newbie
  • *
  • Posts: 3
2 Jumping issues.
« on: June 25, 2018, 11:41:34 AM »
Hi!
I need some help with 2 jumping issues im having.
The first is that it bounces on some platforms whenever i land, and the second is that i can't figure out how to allow my player to move (change directions) when jumping!
Im trying to make a 3D platformer so moving directions while jumping is really important for me.

Here is a picture of my script that i use to jump (using the character-motor):


verybinary

  • Junior Playmaker
  • **
  • Posts: 81
    • The Museum of Digital
Re: 2 Jumping issues.
« Reply #1 on: June 26, 2018, 10:45:35 AM »
(copy pasted from another thread that dealth with a similar issue)
I used to have lots of problems with the unity supplied character controllers. this caused an error because of rigidbody, that caused an error because of god knows what else.
I resorted to skipping past all unity controller whatever, and making my own with playmaker. and as a bonus, I now know why something does or doesn't work, or how to change anything easily.
so...
put you a capsule or a 64x128 sprite up there, and make it move with get axis or axis vector, and translate or add force, im pretty sure I use set velocity sometimes, but maybe just with sprites. im not too sure about the specifics but when its set up correctly, its much easier to tweak it to act like you want it to.

xxltnt

  • Playmaker Newbie
  • *
  • Posts: 3
Re: 2 Jumping issues.
« Reply #2 on: June 26, 2018, 03:07:38 PM »
Do you have any video or something that could push me in the right way?

verybinary

  • Junior Playmaker
  • **
  • Posts: 81
    • The Museum of Digital
Re: 2 Jumping issues.
« Reply #3 on: June 26, 2018, 04:19:30 PM »
I could get you screenshots, but not till I get home.
Ill get you a setup using a capsule that moves left and right, jumps, and shoots a devastating red sphere of destruction, unless you want swordplay, in which case, ill replace with a swing with my ancient +3 sword of playmaking(complete with "that is not how a sword is swung" comment openings).

I might actually look up screen recording software. been contemplating a tutorial series about a game from start to end. might as well use this to set up another part of whats going to be needed for that.

verybinary

  • Junior Playmaker
  • **
  • Posts: 81
    • The Museum of Digital
Re: 2 Jumping issues.
« Reply #4 on: June 26, 2018, 10:31:02 PM »
So...
I have screenshots. Lets see  I do this right

Player has a rigidbody to play with physics, and a box collider. This could be a capsule collider but I haven't got around to doing that.
Froze location on z axis Agent Mr GoodGuy doesn't fall off the map. Froze all rotation because all animation would be sprites. This would also work with models because you're controlling the capsule. Import mesh, import animations, make it a child of the capsule and trigger em with another playmaker action later.
And the FSM. The good stuff. The only thing your missing in setup is setting me to global variable Player. Its actually player, I was giving it to you the first time with best practices. All lowercase differentiate my stuff from other stuff. I tend to ignore best practices.
Then grab Horizontal, save it as the tempfloat that you move with velocity.
Tweak mass, gravity, multipliers, etc, to get what you're going for.
Jump FSM on the jump object. First state waits for button to be pressed(get button down) and adds force on the y axis to jump him.
Did anything not get explained?