I know how to create a regular flashlight But how to make realistic flashlight?
On the Internet and on the forum I did not find examples of such a flashlight as in this video
I believe it’s a matter of digging long enough, almost everything has been done by now, is this any closer to what you’re after:
I saw this video, I have the same one now. But it seems to me in the video what i sent that another flashlight . It is not tied to a specific point and is more floating
like the 2D camera has a “camera window” and this flashlight has about the same
It’s a matter of adding some sort of spring interpolation. Are you using a first person point of view for this? There’s probably as many ways of making it floaty as there are people.
Have a look at this:
It’s a flashlight on a springarm:
While I can’t come up with anything simpler than this, we can definitely make it more complex if needed. Perhaps it’s a good starting point?
The next step would be to incorporate an additional offset based on player movement / turning direction. Break it down into a list of desired features / behaviours and start working on them one by one.
I already know that. What I mean is that the light is fixed at a certain point. And I wanted to make a box like in the 2D “camera window”, if
the player goes out of bounds, then the camera follows him. Exactly the same thing, only instead of the player there will be a flashlight. If the flashlight goes beyond certain limits, then only the camera will follow the flashlight
the flashlight always follows the point
.
.
I ask how create box? if the flashlight goes out of Box, only then the camera will follow the flashlight
Dot Product
the camera’s forward
and the flashlight’s forward
vectors, you’ll get a value in -1 <=> 1 range. The closer you are to 1.0, the closer you are to the centre. Instead of a box, you’ll get a much more accurate cone. Start Lerp
ing the flashlight’s direction only once the dot product value exceeds a set threshold. You will need to set up some flow control to arrive at the centre once the interpolation starts.
I already know that.
Consider starting threads with more details, you’ll get the desired answer quicker.
Can you explain this to me?
I don’t understand how I control the arrow?
and why it doesn’t move up and down