# Vector Y speed

0 Favourites
• 5 posts
• Quick question! I want to have a thing in my platformer that when the player lands on a particular surface it launches him violently away. I've got the effect I want working already by temporarily deactivating the controls for 0.5 seconds, simulating control for the opposite direction the player is facing, and setting Vector Y to -1000. Great! The player lands on it and is sent flying upwards.

What I'd like to know is, is there a way to change the speed at which the player is launched away? At the moment it is basically at the speed of a regular jump except super high, and tinkering with the options (setting platform behavior speed and jump strength etc) I can't quite get it exactly right. I want the player to get launched super-fast, as though out of a cannon. Can I do this with Vector Y, and if so how?

• Vector Y is simply the vertical speed. When the player jumps, the game is setting the Vector Y to the value of "Jump Height" * -1 (you can see that if you run debug mode and look at the player's Platformer values

)

So you can easily do a "Set Vector Y to (a negative value)" and it works just like a jump with whatever strength you want

• Hmm. I realised after I made my earlier post that I got it a bit wrong. Let me rephrase: I want the player go very fast, but not very far. If I set Vector Y to something modest, say -500 or -1000, they travel the right distance but not fast enough. If I set Vector Y to something stupid, -9000, they go off at the speed of light but also travel waaay too far! I want a platform jump effect that takes the player very fast over a SHORT distance.

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• So basically you want a motion that is NOT natural physics.

You'll need an additional event to artificially cut the momentum of the object, either by comparing the distance travelled, time since launch, or height position, up to you.

Edit: Or make an invisible solid ceiling for your sprite to bonk its head into.

• Ahhh, okay! Thanks, I'll give that a try tomorrow.