|Topic was automatically imported from the old Question2Answer platform.
I am doing some simple game with fire and fire extinguisher objects. Both are made from particles 3D scenes. Also both objects are placed in VR world. I am able to pick up Fire extinguisher from ground with object pickable interactions.
Purpose of the Question
What i am trying to achive is to make a interaction between those systems, that fire will gradually dissapear after i move area of fire extinguisher to it. Is there any good method that i should write in GDscrpt or maybe is there any good workaround to this ?
Thanks for any advices
I managed to do this. The idea is really simple but iam not pro in scripting or giving reference signals to nodes. I have made simple area3D into fire extinguisher which is located in front of fire extinguisher barrel and also the same things for fire. When those areas are crossing each other then the area is hide()
For those who are not familiar with scripting: First thing is to attach script to area which is hiding all those areas that we wanted to be hided.
I never actually tried this, but been thinking on similar problem lately.
I would make both fire and extinguisher dust as area3ds with scripted expansion behavior. This behavior would expand and direct collision shapes, as well as particles point distribution ( Points emission mode ). Collision script will let You make proper interractions.
Yea ! I discovered somewhere that it should be made with areas3d node type. When i grab
extinguisher and after clicked trigger then the extinguisher dust should - lets say - delete the fire. I have made those areas in those to systems but I do not know how to script those properly. In the xr-tools library made by Baastian Olijj GitHub - GodotVR/godot-xr-tools: Support scenes for AR and VR in Godot there is a function nodes for objects like this fire extinguisher which allows to grab object with controllers. I know that i need to extend this script specifically for this device. But I am not familiar with Gdscript ;/
Tahnks for any help !
g3nkoV | 2021-09-30 21:48
You mean You code in other language or You are only familiar with editor itself and no programming language ?
I have no idea how to extinguish this fire from the GDscript point of view. What methods should i use to do it ;(
g3nkoV | 2021-10-01 09:07
First you have to create fire and extinguisher foam, particles will just be visual representation of these. I can’t write whole script for You, You will have to dig into it anyway :). There are a lot of ways to do this. One way would be use polygonal collision shape for mor static area like fire, subdivide it into segments and code behavior on collision to erase or resize own shape until no longer colliding with extinguishing dust area.
You will surely have to learn about collisions, signals, geometry shape operations, particles point distribution, dictionaries. Particles itself will never detect collisions, they provide no feedback at all, because they are extensions of shaders, that run on GPU logic.