I’m working on a grapplegun type thing, and I need to detect if a property is inside the object the mouse is over. This code works as long as I don’t get the property from the mouse over. It says that the property grapple is undefined, which I guess is true, but how do I define it? How do I let it know it’s looking for that property within the hit objects of the mouseover?
if grapple in hit_obj: if keys[leftmouse] >= 1: toggle = True if toggle: target_vec = Vector(player.getVectTo(own)) target_vec.magnitude = PULL_SPEED player.setLinearVelocity(target_vec.xyz) print(toggle)