Hi so im trying to make one of my NPC’s face the players direction at a ceirtain distance, ive used billboard Y to make the NPC face the player but i am unsure how to make it only do this when the player gets close.
any tips?
btw i am very new to game dev and coding
edit: now that ive added my blender import and made it unique the billboard y works in godot but when i launch the game/scene it does not work.
(ceirtain distance problem still happening)
help
If I understand correctly, it sounds like you’re looking for proximity-based billboarding. One option could be a shader that applies the billboard affect dynamically based on the distance.
Thank you everything worked as wanted but the proxy is the opposite of how i wanted it where you go up close and it follows you instead of being far away and following you, and also the object gets bigger for some reason.
sorry for the constant replies btw
thanks
So for reversing the effect, you can swap the distance comparison:
if (dist < 5.0) { // instead of dist > 5.0
The size shouldn’t be changing but it could appear that way with the sudden billboarding. This might be worth doing via GDScript instead since the billboard rotation would persist once it stops following the player. Really depends on what the goal is though.