Far as I could tell there was no inbuilt way to have scalable collision cones in Godot, so I made my own and synced it up with the range of a Spotlight node.
To calculate the angle between two vectors, technically the dot product results in the length of vector 1 * the length of vector 2 * cos(the wanted angle), but if both vectors are normalized, the lengths are both 1, so we get only the cosine we care about. The video setting up security cameras is here: kzitem.info/news/bejne/uW990WaofayJn6Q
@srn8386
2 жыл бұрын
this tutorials are amazing
@iaknihs
2 жыл бұрын
Thanks a lot!
@kidnaplism
3 ай бұрын
"What a brilliant solution! Thank you for making such a useful tutorial video.
@misjavanlaatum
3 жыл бұрын
Is there no pyramid collision shape? That would make a nice estimation for a light cone, right?
@iaknihs
3 жыл бұрын
You can make custom collision shapes from meshes, but they aren't easily adjustable on-the-fly in angle and reach (can scale them like any other object of course). The method in this video is a bit more work to set up, but I wanted a solution that would automatically adjust to any settings on the SpotLight.
@misjavanlaatum
3 жыл бұрын
@@iaknihs that makes perfect sense! awesome video...
@dueddel
2 жыл бұрын
The great tutorial aside for a moment … I like that subtle hint for "Like, Comment & Subscribe". That's how most other YTers should do it as well. I subscribed before, though, and I would have liked the video either way, but at least the "comment" part worked out well. Apparently. 😁👍 Keep up your good work. I'd be happy to see more 3D-related Godot content. 😍
@iaknihs
2 жыл бұрын
Thanks! Glad you're liking the Like etc. sign, I do think it's more fun to work it into the video somewhere once in a while over asking all the time. Absolutely intend to do more 3D as well, will just have to see what may be interesting. (With Godot 4 coming up, I think there's a lot of stuff I'll want to try sometime)
@RikThunder33
3 жыл бұрын
today I learned that you can close codes! Did not know that.
@nope9310
Жыл бұрын
What do you mean? Which part of the video are you referring to?
@RikThunder33
Жыл бұрын
@@nope9310 let me remember... ah yes. 2:47. he closes all the stuff he doesn't need.
@nope9310
Жыл бұрын
@@RikThunder33 Ahh right! He does that so fast that I missed it. Thank you for coming back to explain it. :)
Пікірлер: 13