Can't set target for interpolated camera

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By God Of Theory

I wanted to spawn the player and move the camera towards the player.
However, if the colliding body is a tree, I cant set the camera target, so the camera remains at Vector3(0, 0, 0).
It was working fine until I made some changes in the player spawning system to add some features using the PhysicsDirectSpaceState.
Below is my code(Not the full one, just the part where I think is related):

There are also some errors, but I’m not sure whether it’s related.
Below are the errors:

  1. E 0:00:05.594 rest_info: The shape is not a convex shape, then is not supported: shape type: 7
    <C++ Source> modules/bullet/space_bullet.cpp:247 @ rest_info() @ collide() @ checkCollision() @ placeObj() @ chooseObj() @ loopFill() @ _ready() @ placeLand() @ createWorld() @ _ready() @ _ready()

  2. E 0:00:05.618 get_path_to: Condition “!common_parent” is true. Returned: NodePath()
    <C++ Source> scene/main/node.cpp:1619 @ get_path_to() @ setPlayerPos() @ reSpawn() @ _process()

Finally, if there is any extra information, data or methods you all need to be able to help me, please ask…thanks…

I’ve debugged the code for hours, but to no avail…Hope someone can help me soon…

Have you tried NodePath

'export (NodePath) var target = get_node("where is that node")'

Okan Ozdemir | 2020-05-03 18:34

I’ve solved it,its because I need to delete the previous camera first before adding a new one…thanks anyways…

God Of Theory | 2020-05-07 05:28