Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

polygon:contains()


  • Please log in to reply
3 replies to this topic

#1
InsidiousQuack

InsidiousQuack

    Advanced Member

  • Contributor
  • 138 posts
  • LocationLondon

atm it doesn't work for Vectors as it doesnt seem to have a PointInPolygon part of the :contains() arg, so it doesn't work for Vectors.

I just wanna check if a point is in a polygon ;-;


Edited by QuackQuackQuackQuack, 20 February 2017 - 09:55 .

  • 0

#2
Cloud

Cloud

    KAPPA

  • Ex-Staff
  • PipPipPip
  • 1,498 posts

Why not just use Point2 or something to that effect?

Hah found a snippet of  2DGeometry code i had. Circle2(Point2(pred.castPos), 600). Thats how I used it for something and i remember it working. Also pred.castPos is 3D vector from OpenPredict. I figured out how to do it by messing with 2DGeometry lib and looking at Maxxxels examples.

EDIT:

Found my other example which uses Polygons and works perfectly (also laggy because calc's)

https://github.com/C...d.lua#L162-L163


  • 0

#3
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

if you use 2dgeometry lib, you need convert it to Point2


  • 0

#4
InsidiousQuack

InsidiousQuack

    Advanced Member

  • Contributor
  • 138 posts
  • LocationLondon

alright


  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users