generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help with raycasting!

Previous Thread :: Next Thread 
fun4nerd is not online. fun4nerd
Joined: 30 Oct 2013
Total Posts: 4440
02 Mar 2015 07:23 AM
How do I make the raycast go into different directions instead of having it go forward!
Report Abuse
duckwit is not online. duckwit
Joined: 08 Aug 2008
Total Posts: 1310
02 Mar 2015 07:42 AM
The direction and length of the ray is specified by a Vector3 as the second parameter to the Ray.new() constructing function.

A vector is a mathematical entity that describes a magnitude (length) and direction in n-dimensional space. In this case, the world has 3 dimensions: x (left/right), y (up/down), z (forwards/backwards).

For example, the vector (1,0,0) points in the positive x-direction (right) and (-1,0,0) points in the negative x-direction (left).

By specifying a vector for the direction, you can set the direction of a ray:

someRay = Ray.new(startingPosition, direction)

The magnitude of the vector 'direction' will determine the length of the ray.
Report Abuse
fun4nerd is not online. fun4nerd
Joined: 30 Oct 2013
Total Posts: 4440
02 Mar 2015 07:44 AM
wow duck! let me see what i can do
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image