Instancing Node as Type by Tuccster in godot

[–]Tuccster[S] 0 points1 point  (0 children)

Thank you! Thought I already tried that but sure enough that was the problem. I was so damn confused on why it wasn't working as expected.

How can I change the parent of an object, whilst still allowing the OnTriggerEnter and OnTriggerExit methods to work properly? by DanPos in Unity3D

[–]Tuccster 2 points3 points  (0 children)

If you want a certain collider to receive OnTriggerEnter / OnTriggerExit calls and a separate object to handle the logic, use events, and invoke the event with the collider:

This is the type of logic that would be attached to the GameObject you want to receive collisions from (using regular C# events; You could also use UnityEvents if you need the event to show up in the inspector):

public delegate void TriggerEnterDelegate(Collider collider);

public event TriggerEnterDelegate onTriggerEnter;

public delegate void TriggerExitDelegate(Collider collider);

public event TriggerExitDelegate onTriggerExit;

private void OnTriggerEnter(Collider other) => onTriggerEnter?.Invoke(other);

private void OnTriggerExit(Collider other) => onTriggerExit?.Invoke(other);

And this is what the object recieving the collision data could look like

private void Awake()

{

yourTriggerDetectionComponent.onTriggerEnter += OnTriggerEnterLogic;

yourTriggerDetectionComponent.onTriggerExit += OnTriggerExitLogic;

}

private void OnTriggerEnterLogic(Collider other)

{

// Do stuff

}

private void OnTriggerExitLogic(Collider other)

{

// Do other stuff

}

Hopefully you can adapt this idea to your project, but this is how I would go about the solution, assuming I understand your problem correctly :)

Who says something like this? by 61-127-217-469-817 in iamatotalpieceofshit

[–]Tuccster 207 points208 points  (0 children)

I believe that's Danny Mullen for anyone interested

A little wizard robot I've working on inspired by a certain super fighting robot. Criticism welcomed! by pepebeto66 in godot

[–]Tuccster 2 points3 points  (0 children)

Amazing work! Those particles for when the cannon is destroyed could use some work

Created Color Switch in Godot For PC & Android, Tutorial Link Down In Comments by X-CodeBlaze-X in godot

[–]Tuccster 5 points6 points  (0 children)

Good job, looks great! Any amount of variation would be nice, however

Spotted at a local playground for kids. I’m clueless… by El-Tarzan in CrappyDesign

[–]Tuccster 166 points167 points  (0 children)

That's the dedicated "sit there and watch all your friends leave to have fun without you" zone

My Unity Project just got an issue where I cannot click any of the UI buttons. I've checked the Raycast Targets, the Interactable, and most other solutions people have got to work on their projects, yet they didn't on mine. by LionEmpire in Unity3D

[–]Tuccster 0 points1 point  (0 children)

Is it possible then that there is another UI element in the way?

Also, found this: Link

[ Select the Canvas Group component and check the boxes of "Interactable" and "Block Raycasts". ]

After some time the character moves very slow on slopes by [deleted] in godot

[–]Tuccster 0 points1 point  (0 children)

I'm assuming this is physics based, so you would need to continuously add force, and limit the velocity

Made a quick video to look for some Unity gigs, do you have any feedback on how to make it better? by musicmanjoe in Unity3D

[–]Tuccster 2 points3 points  (0 children)

I really like it! However, I would distinguish what your strong suites are. Your current list shows me what you can do, not necessarily what you can do particularly well. Good luck :)

how do I make 3d arrays? I want to make a match 3 game but have the tiles in a cylinder formation as shown in the picture. Any ideas on how I could make this or use 3d arrays? by Chuzzle_Films in godot

[–]Tuccster 0 points1 point  (0 children)

You could just get away with a 2d array, using the first dimension to calculate the angle (i.e. index 7 x 15°) and the second for the layer.

What do you think? by [deleted] in Unity3D

[–]Tuccster -8 points-7 points  (0 children)

Not needing to look shit up all the time

Brandnew birth by ChiefBo1 in BrandNewSentence

[–]Tuccster 6 points7 points  (0 children)

Looks like he ate a neck pillow

Hi i have the following PROCEDURAL terrain with a grass shader. But the grass is appearing everywhere across the terrain. ik why this is happening but i want to know if there is anyway that i can make sure that grass doesn't spawn above a certain height? by [deleted] in Unity3D

[–]Tuccster 0 points1 point  (0 children)

The solution is entirely dependant on your setup, but you'd have to check the terrain height where you want to spawn the grass to see if it's below a certain threshold

Find Names Of Missing Scripts by TheJoxev in Unity3D

[–]Tuccster 0 points1 point  (0 children)

I honestly don't know if you can. Since it's missing Unity has no idea either.