![]() However, there are several benefits you get from raycasting, that you wouldn’t get otherwise. A ray is a line that can go on indefinitely, but will tend to just go from point A with a set length. To start with, lets discuss what a ray actually is. Raycasting is an essential part of a developers kit and can be used in multiple ways. Generally speaking they are a cheap solution to a lot of problems you might find as a developer. ![]() There are quite a few uses for raycasts which make them extremely useful. For example, you can get the new trajectory of a grenade by using raycasting and the dot method to find the new angle at which the grenade is now travelling at. Raycasts also allow you to create vectors which you can use to perform mathematical operations which are especially useful when trying to find certain pieces of information. Especially in terms of the bullet hitting an instance, where you can predict the bullet hitting that instance right before it hits it making it superior to events like. Imagine you want bullet drop, or a trajectory that isn’t completely linear, raycasting helps to achieve that. Even if you did use Mouse.Hit/Target for the purpose you suggested you wouldn’t get the realism that raycasting can provide. ![]() Mouse.Hit and Mouse.Target represent a small portion of what could be achieved using raycasting. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |