Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any limit range (distance) of the interactive mode? #17

Open
nagasawamaki opened this issue Feb 29, 2024 · 4 comments
Open

Is there any limit range (distance) of the interactive mode? #17

nagasawamaki opened this issue Feb 29, 2024 · 4 comments

Comments

@nagasawamaki
Copy link

nagasawamaki commented Feb 29, 2024

I tried to paint the grass with interactive mode.

But found that for some grass which painted far away (around more than 20m from the global origin) will not interact with my character.

So may I ask is there any limit on the range (distance) of the grass for interactive mode?
Or am I missing something to set it properly?

Thanks.

PS. found the below error in Godot:
E 0:00:01:0369 instance_set_custom_aabb: Condition "!is_geometry_instance(instance->base_type)" is true. <C++ Source> servers/rendering/renderer_scene_cull.cpp:1019 @ instance_set_custom_aabb()

PS2. seems the above error is not corresponded to the no interactive situation.

@IcterusGames
Copy link
Owner

Are you updating SimpleGrassTextured by calling SimpleGrass.set_player_position(global_position) on _process or _physics_process function of your character/camera node ?
Note: look step 5 on readme.md

@yythlj
Copy link

yythlj commented Mar 17, 2024

The grass patches in my SimpleGrass node do not dynamically move along with the player's position, even though _process and _physics_process are called correctly (and SimpleGrass's interactive mode is also correctly set), using the default grass mesh.

I am using SimpleGrass.set_player_position(global_position) but the grass does not follow the player. I have also correctly added the player body3d node with a 17 collision mask.

Could this be related to how my node is using a new window mode/new world3d that is created? I am using the following code to add a newwindow node to get_tree().get_root():

haxe
复制
func OpenWorld(nodeName, idx, data=null):

var worldNew = widx_map[idx].instantiate()
var newwindow = Window.new()

newwindow.set_embedding_subwindows(true)
newwindow.set_disable_input(false)
newwindow.set_handle_input_locally(true)
newwindow.set_flag(Window.FLAG_NO_FOCUS, false)
newwindow.set_transient(true)

newwindow.set_world_3d(World3D.new())
newwindow.set_use_own_world_3d(true)

newwindow.set_name(nodeName)
instance_map[nodeName] = newwindow

get_tree().get_root().add_child(newwindow)

worldNew.set_name(nodeName)
worldNew.Init()

newwindow.add_child(worldNew)
worldNew.OnGoto(data)

newwindow.set_size(get_tree().get_root().get_size())
The terrain3d node is added as a child of the node3d node, which is then a child of the newwindow node. The SimpleGrass node is then a child of the terrain3d node's scene.

please tell me if using a new window/world setup could be causing the grass to not follow the player properly.my english is not good ,sorry

@yythlj
Copy link

yythlj commented Mar 17, 2024

image
this is the node3d node

@IcterusGames
Copy link
Owner

The grass patches in my SimpleGrass node do not dynamically move along with the player's position, even though _process and _physics_process are called correctly (and SimpleGrass's interactive mode is also correctly set), using the default grass mesh.

I am using SimpleGrass.set_player_position(global_position) but the grass does not follow the player. I have also correctly added the player body3d node with a 17 collision mask.

Could this be related to how my node is using a new window mode/new world3d that is created? I am using the following code to add a newwindow node to get_tree().get_root():

haxe 复制 func OpenWorld(nodeName, idx, data=null):

var worldNew = widx_map[idx].instantiate() var newwindow = Window.new()

newwindow.set_embedding_subwindows(true) newwindow.set_disable_input(false) newwindow.set_handle_input_locally(true) newwindow.set_flag(Window.FLAG_NO_FOCUS, false) newwindow.set_transient(true)

newwindow.set_world_3d(World3D.new()) newwindow.set_use_own_world_3d(true)

newwindow.set_name(nodeName) instance_map[nodeName] = newwindow

get_tree().get_root().add_child(newwindow)

worldNew.set_name(nodeName) worldNew.Init()

newwindow.add_child(worldNew) worldNew.OnGoto(data)

newwindow.set_size(get_tree().get_root().get_size()) The terrain3d node is added as a child of the node3d node, which is then a child of the newwindow node. The SimpleGrass node is then a child of the terrain3d node's scene.

please tell me if using a new window/world setup could be causing the grass to not follow the player properly.my english is not good ,sorry

When you use a new world the SimpleGrass camera cannot see the objects within that world, that is why the interactive mode does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants