You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In previous versions(fd61a42), I can obtain ray_result through this code
extends Node3D
const RAY_LENGTH = 1000.0
var ray_result = null
func check_ray():
var space_state = get_world_3d().direct_space_state
var cam = %Camera3D
var mousepos = get_viewport().get_mouse_position()
var origin = cam.project_ray_origin(mousepos)
var end = origin + cam.project_ray_normal(mousepos) * RAY_LENGTH
var query = PhysicsRayQueryParameters3D.create(origin, end)
query.collide_with_areas = true
var result = space_state.intersect_ray(query)
ray_result = result
printt("ray_result",ray_result)
func _physics_process(delta):
check_ray()
But in the version(04dd299), I couldn't get the correct result
Note that if the node tree is adjusted to
regardless of the version, ray_result can be obtained correctly
The issue should be due to the relevant modifications in Skeleton3D
After the start of the simulation by physical_bones_start_simulation(), it seems to be functioning correctly.
I think this issue is caused by the fact that the simulation is explicitly excluded from PhysicsServer3D when it is not running, so it is not detectable from there.
However, since I don't remember changing the registration process of the PhysicsServer3D, I am rather wondering why the past PhysicalBone is still detectable by PhysicsServer3D even though it is not running a simulation. There are performance concerns with having it enabled all the time.
TokageItLab
changed the title
intersect_ray has some issues
Unsimulated PhysicsBone3D in skeleton children cannot be detected by intersect_ray
May 21, 2024
TokageItLab
changed the title
Unsimulated PhysicsBone3D in skeleton children cannot be detected by intersect_ray
Unsimulated PhysicalBone3D in skeleton children cannot be detected by intersect_ray
May 21, 2024
Tested versions
This issue is due to the commit:
04dd299cbac614c0ff2306b8d3cD60dcd86abd8e
@TokageItLab
System information
windows 11
Issue description
In previous versions(fd61a42), I can obtain ray_result through this code
But in the version(04dd299), I couldn't get the correct result
Steps to reproduce
2024-04-10.15-02-23.mp4
2024-04-10.15-08-04.mp4
node tree is:
Note that if the node tree is adjusted to
regardless of the version, ray_result can be obtained correctly
The issue should be due to the relevant modifications in Skeleton3D
Minimal reproduction project (MRP)
TestIntersectRay.zip
The text was updated successfully, but these errors were encountered: