#Tower Defense Hitbox
33 messages · Page 1 of 1 (latest)
are u using Raycast
SPATIAL QUERIES :D
no
The character doesnt exist
its all data
Tower = {
Property1 = 2,
Position = vector2.new(x, y)
}
Enemy= {
Property1 = 2,
Position = vector2.new(x, y)
}
hm
so lets rename the variables u know a bit better
u know the difference of positions (vector)
and u know the size of the rectangle
correct?
i can get any data i need from the client
but not the enemies position
i send the hitboxdata to the server
then it's created there
and it checks for enemies
i dont really get what u mean
tell me exactly what you know/can get
and the type
and tell me exactly what u want
collision detection?
why not use CollectionService to handle the Stuff
You mean something like?
https://devforum.roblox.com/t/check-if-position-is-in-part/2185552
YES THE SIMPLE METHODS HAVE BEEN ATTEMPED (e.g. GetTouchingParts(), ZonePlus module, comparing individual X,Y,Z components etc) How would I ACCURATELY check if a position is within the interior of a block? As mentioned above, the common methods found on DevForum do not work. Cheers
no
there are no parts
in the workspace
just replace the Part with the date you have
function isPointInPart(point, cf, size)
local p = cf:PointToObjectSpace(point)
local s = size/2
return p.X >= -s.X and p.X <= s.x and p.Y >= -s.Y ... etc
end
ill test it out
thanks