Godot Version 4
Question
I have asked someone about my problem before and he said that is was unusual and he didn’t know how to fix it. So when I run the test I can see the sun and move the camera with my mouse but I can’t see my objects, and yes I did give them collisions.
here is what it looks like:
and this is all of my code:
extends CharacterBody3D
const SPEED = 5.0
const JUMP_VELOCITY = 5.0
func _physics_process(delta: float) -> void:
_update_camera(delta)
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta
# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var input_dir := Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
var direction := (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
if direction:
velocity.x = direction.x * SPEED
velocity.z = direction.z * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
velocity.z = move_toward(velocity.z, 0, SPEED)
move_and_slide()
func _input(event):
if event.is_action_pressed("exit"):
get_tree().quit()
func _ready():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
var _mouse_input : bool = false
var _mouse_rotation : Vector3
var _rotation_input : float
var _tilt_input : float
var _player_rotation : Vector3
var _camera_rotation : Vector3
func _unhandled_input(event):
_mouse_input = event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED
if _mouse_input :
_rotation_input = -event.relative.x * MOUSE_SENSITIVITY
_tilt_input = -event.relative.y * MOUSE_SENSITIVITY
print(Vector2(_rotation_input,_tilt_input))
@export var TILT_LOWER_LIMIT := deg_to_rad(-90.0)
@export var TILT_UPPER_LIMIT := deg_to_rad(90.0)
@export var CAMERA_CONTROLLER : Camera3D
@export var MOUSE_SENSITIVITY : float = 0.5
func _update_camera(delta):
_mouse_rotation.x += _tilt_input * delta
_mouse_rotation.x = clamp(_mouse_rotation.x, TILT_UPPER_LIMIT, TILT_UPPER_LIMIT)
_mouse_rotation.y += _rotation_input * delta
_player_rotation = Vector3(0.0,_mouse_rotation.y,0.0)
_camera_rotation = Vector3(_mouse_rotation.x,0.0,0.0)
CAMERA_CONTROLLER.transform.basis = Basis.from_euler(_camera_rotation)
CAMERA_CONTROLLER.rotation.z = 0.0
global_transform.basis = Basis.from_euler(_player_rotation)
_rotation_input = 0.0
_tilt_input = 0.0
dusk
October 27, 2024, 6:43pm
2
Can you send a screenshot of the godot scene tree, i think ur objects are missing mesh instances
If not that then u might’ve accidentally turned on culling for those visibility layers on ur camera
dusk
October 27, 2024, 6:52pm
7
Is the error causing ur game to stop? Bcs if it happens on the first frame of ur game then nothing loads in and ur game stops
no it dosent cause my game to stop, I can still move the camera, but I can’t see objects
dusk
October 27, 2024, 6:53pm
9
And you can see them in the editor?
Can you screenshot the 3d view of the level scene
dusk
October 27, 2024, 6:55pm
11
Weird, the only 2 issues i think could be happening are
1: The camera’s visibility layers (cull mask thing on the screenshot) are wrong
2: The player falls thru the floor?
dusk
October 27, 2024, 6:56pm
12
Wait wait i think i know
When u go into ur project settings
Which scene is the main scene
The main scene is level001.tscn
at the bottom is says someyhing about rendering
dusk
October 27, 2024, 7:02pm
15
found something-
opened 09:05PM - 22 Dec 23 UTC
bug
topic:rendering
topic:3d
### Tested versions
Godot Engine v4.2.1.stable.official
### System information…
Godot v4.2.1.stable - Windows 10.0.22000 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.4617) - Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 Threads)
### Issue description
I am not entirely sure if it's a bug or not but I've tried posting it on the reddit first but nobody replied. I am new at using GODOT engine.
I am not entirely sure why it has happened because it has popped out of the blue but I have two scenes, one scenario has a game layout and objects and the second scene has player node that has mesh and player script inside it. Whenever I update the script it works just fine but whenever I try to adjust the camera position or the mesh position it doesn't update in first scene.


https://github.com/godotengine/godot/assets/28166876/cbc47d29-5728-4cea-b152-a35d7edd7bbe
I have tried googling the error but I've found nothing.
### Steps to reproduce
At first I started the project and noticed that the controller's mesh is out of place I went to fix it in second scene and saved, it started throwing me ```servers/rendering/renderer_scene_cull.cpp:3401 - Parameter "scenario" is null.``` error whenever changing the scenes. I have checked the dependencies and everything seems to be in place.
### Minimal reproduction project (MRP)
[Test.zip](https://github.com/godotengine/godot/files/13756708/Test.zip)
Can you screenshot the full scene tree of ur player scene
Like show all the nodes and their children
I think it has something to do with a node in ur camera like a Reflection Probe or smth
I do have a reflection probe
dusk
October 27, 2024, 7:05pm
17
Can you delete it and test that, also why would u need a reflection probe, idrk what it does tho
idk what it does but the tutorial I was following said to put it in
dusk
October 27, 2024, 7:06pm
19
What tutorial, can u send a link
i think it might be a visual thing, to make the scene look nicer
I bet the game would work fine if u deleted it
yeah, I deleted it but the problem persists (it didn’t work)