#3rd person

1 messages · Page 1 of 1 (latest)

copper spoke
#

i am trying to make a 3rd person game and i have this code "pivot.rotate_z(deg_to_rad(-event.relative.x * sens))" and it says attempt to call function 'rotate_z' in base 'null instance' on a null instance. how do i fix this?

left heath
#

your pivot isn't set when this code runs. You should debug your code to figure out where you think it is coming from, and why it isn't set at the time this code is running

#

Perhaps this script requires children to be set up? Or they're misnamed? Or this code is running before the node is _ready? Or you need to set something in the inspector?

copper spoke
#

@left heath well i got the code from a tutorial from gwizz