Godot Version
3
Sometimes after bouncing of my cat paws its start moving like this and it is very annoying
Any ideas ?
3
Sometimes after bouncing of my cat paws its start moving like this and it is very annoying
Only moves like this when its angle becomes 0
Well, you could have a minimum Y speed for the object.
Something like this:
if velocity.y > 0:
if velocity.y < 50:
velocity.y = 50
else:
if velocity.y > -50:
velocity.y = -50
Put that code before the move_and_slide() of the mouse.
That way it will always come back to you. The y velocity will never be like 2 or 3. It will always head in one direction or another with a minimum value.
The problem you’re having is that the object is moving with a value of like 5 at best so it will take forever to return to the paws.
Okay, thanks but i am little bit confused how will speed affect at my angle and how by changing the speed my ball angle will be changed?
Trust me. Try it and let me know. If it works I’ll explain it to you in detail.
I am trusting you, i just want to understand not just to copy past😅.I will try soon
I dont have any move_and_slide() in my mouse maybe you mean move and colide ?
i think its helped a little bit but if my player hit my ball and it goes like this position its starts moving like this.
Hi! I suggest that when the mouse bounces off the edges three times, its movement direction should be adjusted to aim towards the bottom.
Hi, I will try now, thanks
Really worked, Thank you
Thanks for helping, I appreciate it!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.