![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | arthurZ |
Hi, I was making some tests with tween interpolation property, but I found this weird behavior (gif below). I was wondering if there is a way to avoid the KinematicBody2D
from entering the platform’s collisionShape2D
in this situation.
-
This is the line I was using:
$MoveTween.interpolate_property (self, "position", position, position + Vector (30, -100), 5.0, Tween.TRANS_SINE, Tween.EASE_OUT, 0.032)
-
I set all
layers
andmasks
correctly, so thatKinematicBody2D
starts the gif colliding with the floor. -
Tween has
Playback_proccess_mode
Physics checked (is this right?).
Thanks.
Maybe the tweening function isn’t playing nice with the collision detection? Is there a way to make it work within the physics functions of KinematicBody2D
?
Ertain | 2019-11-06 00:52
It’s weird, it’s almost like it doesn’t have a CollisionShape2D when it’s in the middle of the tweening. Maybe it’s the old problem of animating the position using position vector instead of trying another way.
But which another way??
Just as a test, I seted the velocity.y = -1000000 in move_and_slide
method, and the KinematicBody2D respected the CollisionShape2D of the platform.
Why people don’t wanna to create a relative position for the AnimationPlayer using the move_and_slide algorithm or something like that? It could make things so much easy to animate.
I’m still waiting some help with this. =(
arthurZ | 2019-11-06 02:00
I don’t know if the developers can do that. :-/
Ertain | 2019-11-06 06:31