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
 

Best way to find aerial vehicles?

Previous Thread :: Next Thread 
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
21 Dec 2014 11:54 AM
I am making an anti-aerial cannon that takes down any (or most) airborne vehicle, but I have a couple of problems.

What would be the best way to determine if a given model is airborne? If I based it off of Y position, then my cannon couldn't operate atop mountains or very high places. I was thinking about raycasting downwards from the given model, but I am not too fond of that idea.

Secondly, is there a good way to differentiate cars from planes?

And would it be a good idea to check if something is a vehicle by recursively checking for a seat?
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
21 Dec 2014 11:58 AM
Yes you should use raycast, that's probably the best solution.

Helpful links:

http://wiki.roblox.com/index.php?title=How_to_Make_a_Raycasting_Lasergun
http://wiki.roblox.com/index.php/Raycasting
http://wiki.roblox.com/index.php/FindPartOnRay
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
21 Dec 2014 11:59 AM
First you should raycast from the gun to the plane, than raycast from the plane down to see if its airborn
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
21 Dec 2014 12:41 PM
I know how to raycast, I was just wondering if there was anything that would be easier.
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
21 Dec 2014 12:42 PM
Not easier, I mean more effective (unless raycasting is the best option).
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
21 Dec 2014 12:48 PM
What you do is loop though all of the vheicals, than you send a raycast down on each one to see if it's in the air. Then you send a ray from the gun to the plane to see if anything is in the way and get the range, shoot closest one
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
21 Dec 2014 12:51 PM
???

just put a value inside of air vehicles.. a tank flying through the air doesn't make it's armor automatically more vulnerable to anti-air cannons
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
21 Dec 2014 12:54 PM
It's an anti aircraft autosentry.
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