-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Can't get space when using physics engines direct #17401
Comments
Can't you use |
I think that we should create a specific function that does it internally |
@bojidar-bg I didn't know that, I'll try that tonight! @AndreaCatania it would be nice as its not a clear step to take |
EDIT: Oct 17, 2019 |
@BastiaanOlij Could you confirm the above comment? |
Owh, I have to find some time this weekend to see if I can verify that claim. If it does that would be splendid. |
Doesn't |
Yep, but the idea is to: #17401 (comment) |
Closing this issues, since |
Godot version:
Godot 3.0.2
OS/device including version:
Windows 10, but not important
Issue description:
The only way to obtain a space object is to use a physics body or area, as I'm using PhysicsServer directly to do testing not supported by the standard physics bodies. It seems a bit overdone to use those as Godot will complain of not adding any collision body nodes but as I'm using shapes directly, don't need those :)
Was talking with @AndreaCatania about adding the ability to get the main space or something like that.
Steps to reproduce:
See example once i have it uploaded
Minimal reproduction project:
This test project shows what I'm trying to accomplish:
https://www.dropbox.com/s/2wvmgddglkkg3oc/Test_teleport.zip?dl=0
In this project have a look at the Function_Teleport.tscn file, you'll see that the root node is a Kinematic Body but there really is no use for it to be a Kinematic Body
Looking at Function_Teleport.gd line 101 - 102, those 2 lines of code obtain the direct state object needed to perform the collision checks I'm doing. To be able to do
var space = PhysicsServer.body_get_space(self.get_rid())
I need this node to be a kinematic body.The text was updated successfully, but these errors were encountered: