+1 vote

I have a player defined as KinematicBody2D. I want to create another node or body in such a way that it move with constant velocity or speed even if the player jumps on it. The player should not be able to stop or reduce speed or rotate the body, etc by jumping on it. Can you please help me to resolve this ?

in Engine by (44 points)

1 Answer

+1 vote

Hey!
It seems to me this resource will do well to solve your problems.
Your question made me curious, because I realized I didn’t think I could do that either. Hopefully that does the trick.

I hope I could be of some assistance to you.
Maxwell

by (155 points)

Please do let me know if the problem persists with this solution so that I can take the answer down, as to not mislead others

Thanks for the answer Max.

I got another way of doing this is by changing the current position of body moving up using below statement inside physicsprocess() function :

position.y = position.y - 2

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.