Hi, i'm stuck, i'm making the base of a platformer 3d game but i just run into a problem my player (kinematicBody) can't grab a collectible (an instanced spatial node with a an "Area" as a child), so let me explain it a little better:
This is my player node: here
This is my collectible node : here
and they're in this "level" node: here
my collectible node it's a blender model with U/V maps (exported with the better collada exporter)
it's simple my player may enter the colission shape and that should trigger the animation for been taken however nothing happens
when the level loads my player (golfball) loads first then loads my collectible (EnergyC) energy connect the body_entered signal of his child area:
extends Node
var taken = false
func _ready():
$Energy.connect("body_entered", self, "trigger")
func _process(delta):
prueba(delta)
func trigger(body):
# if body.has_method("energyg") and not taken:
# body.energyg()
# $Energy/Anim.play("take")
# taken = true
$Energy/Anim.play("take")
taken = true
func prueba(delta):
if Input.is_action_pressed("act_mas") and not taken:
$Energy/Anim.play("take")
taken =true
I test with the simple animation alone to test if my body.has_method("energyg")
was the problem however the problem persist. i also test de play animation code putting it in into pressing a button and it worked just fine.
my player node moves with move_and_slide
and it's physics are in _physics_process
it collide without problems with static and rigid bodys
my collectible node have and area as a child this area is monitoring and it's monitorable it has two collision shapes neither of them are disable : here
the coins from the 3D platform demo works just fine and i also made the fps tutorial from the godotdocs web and i had colletibles node that were spatial nodes with area nodes as childs, this level have other scrips with connected signals working it's just this one that doesn't trigger
Thanks in advance, if you need any aditional information i will anwser as soon as I can