i´m new here and I´m doing a small flipper game in order to learn how to code with Godot 3.
Up to now what puzzles me the most is a problem that occurs with collision shape, but it is something that doesn´t happens all the time: either I´m doing something wrong, or there is a bug with the physic engine.
The game starts with a ball (Rigidbody, mode rigid) laying on top of a spring (Rigidbody, mode character).When the player hit the down arrow, the spring is compressed down (the ball follows it, because gravity is enable) and when the button is released the spring come back to original position and push the ball into the game table.
enter link description here
Here´s the script for the spring movement:
export (float) var SPEED_UP
export (float) var SPEED_DOWN
if Input.is_action_pressed("ui_down") and position.y<lower_point:
elif Input.is_action_pressed("ui_down") and position.y>=lower_point:
if position.x>684 or position.x<682:
It works fine most of the time, but then magic happens: somehow when the spring is in a lower position, the ball find a way to "push" the collision shape of the spring by side, and i dont mean the entire "spring" node (rigid body + sprite + collision), but the collision shape only (at least it looks like that): in fact, the sprite remain perfectly in position, and even if i attach another sprite as a child of said uncooperative collision shape I cant see any strange movement.
However from the moment in which the first ball move the collision shape away, all the further ball simply fall through the spring: collision shape is no more there!
Hope i made myself clear, do somebody know what´s happening here?