Player actor has velocity-X of 250. PROBLEM: He cannot climb angled platforms. Please help.
Hey, so I have a platformer game I am building, and i wanted to add some angled platforms that he runs on.
The way the game is set up, I have the Player actor set up with 250 X-Velocity, so he is constantly running throughout the level.
I decided today that I am going to add some angled platforms, but holy camoly did that ever not work out.
Whenever the play gets to the angled platform, he simply slides back down and goes through the level in reverse! So, even though the players X-velocity is set to 250, the player is now going like -100 X-velocity... I even tried putting rules such as "If players X-Velocity is less than 249, change X-velocity to 250", and I even tried replacing that rule with "MOVE player in Right direction at speed of 250". These simply don't want to do anything.
Thank you!
Comments
@JodyMitona, try playing around with the friction of the platform and actor. Increase it to give more grip.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Thanks for the idea, Hopy, but I just came back to this thread to let everyone know how to solve this crazy problem! SUPER excited right now.
After trying over 20 different rules/gravity/density/friction/angle stuff and whatever you may think of in relation to all of this, I FINALLY got it! lol
So, if you're like most of us, your scene doesn't actually have gravity turned on. Good.
Now, to achieve this simple fix, all you have to do is change 1 tiny thing...
Where you have acceleration set to 270 degrees (to create scenic gravity), simply change "relative to: scene" to "relative to: actor". BAM. This way, when the actor is angled at the same angle as the platform he is on, the acceleration going downward is not messing everything up, causing the actor to slide back down the angled platform!
I got lucky here, as I was just about to explode and give up for the night - but now - back to production!
PS. Friction for the Player actor and the platforms are all set to zero (0).
Alright - not AS excited anymore. Looks like I need to still do some tweaking, as when the player jumps, they can sneakishly end up going faster. -_- CRAP.
@JodyMitoma , set friction higher 0 is like ice.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
@Hopscotch
As soon as I put friction on my character, he eventually slows down and goes in reverse. O.o
@JodyMitoma , ok, obviously the setting are dependant on the method you are using.
How do you make your actor jump? Are you changing his linear Y motion? Accelerate?
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
@Hopscotch
I am using Change Attribute self.motion.linearVelocityY to 750, yes.
I'm about to give up on having any angled platforms in my game. This is getting atrocious.
Another issue I'm having besides the whole climbing thing (he kind of climbs it now, but if you keep jumping and land on the angled platform, the player will just fly into the sky and be lost forever... What the heck?!
@JodyMitoma , him flying off, does he change his rotation/angle when landing on the slope and maybe bouncing? This may be caused by the fact that you set the actors gravity in relation to the actor and not the scene.
You can fixate the actors rotation in the physics panel, but I do suggest setting the actors gravity in relation to the scene.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
@Hopscotch, yes I do have it so that my actor changes angles when he lands on an angled platform. I have FixedRotation off and a Density of 1 on my Player actor so that he does that.
My bounciness is set to 0 for the platforms and my Player actor.
Maybe I'll change the gravity back to scene and see what I can do from there.
@Hopscotch, what the hell. I just made a Constraint Attribute self.motion.linearVelocty.x to 250, and it fixed every issue... How is this even possible? Except, sometimes the player will lose rotation and climb up the hill on its stomach or back, or head even.
@JodyMitoma , as you see, there are many many ways to skin a cat, the interplay with other functionality determining which is the better.
My suggestion is just to remove as many variables (things you can't completely control) as possible, like the gravity set in relation to actor. If the actor ever falls over he will go buzzing off screen like a deflating balloon.
Doing the constrain X thing looks right though for a platformer with actor moving at constant speed.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Woah. Just changed Collision Shape to circle, and it fixed all O.o I'd of thought a circle would cause him to do more weird things (go on his side, back ,etc), but it actually got rid of it. Wohoo!! My game is coming along GREAT!! THANK YOU FOR THE HELP!
@JodyMitoma , my pleasure, but other than putting my two bits in here and there, I did not really contribute to your progress.
You seem to be doing well on your own, exhibiting exemplary experimentation enthusiasm and endurance (oO, all e's, that was not intentional).
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com