Roblox Studio Tutorial | Laser Gun Game Scripting

Опубликовано: 23 Март 2023
на канале: Funzone
238
2

Roblox Studio Tutorial | Laser Gun Game Scripting
Join Our Roblox Group : https://bit.ly/320klfG
Check out my game FunZone Mining at https://bit.ly/2UbpDnC


Roblox Studio Gameplay Mechanics Hit Detection with Lasers
Use raycasting and hit detection to shoot lasers from a blaster.
In this course, you’ll learn how to cast a laser from the blaster in Creating Player Tools and detect whether or not it hits a player.
Raycasting to Find Collisions
Raycasting creates an invisible ray from a start position towards a given direction with a defined length.
If the ray collides with objects or terrain in its path, it will return information on the collision such as the position and the object it collided with.
Finding the Mouse Location
Before a laser can be shot, you must first know where the player is aiming.
This can be found by raycasting from the player’s 2D mouse location on the screen directly forwards from the camera into the game world.
The ray will collide with whatever the player is aiming at with the mouse.
Open the ToolController script inside the Blaster tool from previous video Creating Player Tools.
If you haven’t completed that course yet you can download the Blaster model and insert it into StarterPack.

#Roblox
#RobloxStudio
#RobloxStudioTutorial
#robloxcoding
#script
#scripting.


Смотрите видео Roblox Studio Tutorial | Laser Gun Game Scripting онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Funzone 23 Март 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 238 раз и оно понравилось 2 людям.