0 votes

Hi everyone, I have the problem that I mentioned in the title, basically:

I want to go from a point A to a point B using moveandcollide, for x just with the next lines on velocity is working fine:

velocity.x -= distanceToTravel * delta * speedLateral
move_and_collide(velocity)

I'm controling if I reach point B comparing the distanceTraveled, until here everything is right, but I want this move doing a basic parabola on y axis, the problem is that I don't know how to approach to implement it on velocity vector.. I've implemented it using basic parabola formula and setting the KinematicBody2D position.y and I can emulate it perfectly, but obviously I want it on velocity

Basic parabola: https://amsi.org.au/ESA_Senior_Years/imageSenior/2a_2.png
Parabola using python example: http://chris35wills.github.io/parabola_python/

Any idea about how can I make it?

Thanks!

in Engine by (60 points)

Just so I'm sure I'm completely understanding this, you want to accelerate until you've traveled half the distance and decelerate until you get to point B?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.