Correct, as of now it does not support AnchorPoint. v1.17.0 will have these updates in it! I am working on these features currently, new updates will be released soon!
This as well!
Correct, as of now it does not support AnchorPoint. v1.17.0 will have these updates in it! I am working on these features currently, new updates will be released soon!
This as well!
Amazing thanks! I ll be sure to credit you! If I end up using it
Great news!
Tomorrow, I will be posting the tutorial about making your first GUI Based 2 dimensional game on Roblox! And this module will be included in the tutorial, so you can check that out as well for some more use cases of the module!
Tutorial is Out: [Flappy Bird] Create your first 2 Dimensional Gui Based Game!
Updated how OnCollisionEnded event is fired. It will not fire unnecessarily when hitters are not in touch with colliders.
Added āsolidā property to :addCollider()
, setting it to true makes it impossible for a hitter to go through a collider! Example:
local GuiCollisionService = require(game.ReplicatedStorage.GuiCollisionService)
local group = GuiCollisionService.createCollisionGroup()
group:addHitter(guiInstanceHitter)
group:addCollider(guiInstanceCollider, true) -- To make it impossible for a hitter to go through the collider
Special thanks to @RuizuKun_Dev without whom, this wouldnāt have been possible, after understanding the math, I was able to figure out how easy this was to implement!
I am working on a 2D RayCasting module to help you cast rays even when the rotation of the gui is not 0 for 2D projectiles. Stay tuned!
There are a few bugs to this, which I have been fixing, thanks!
If you would like to see similar updates to the Module, be sure to reply down below with your ideas!
Currently working on Tween Cancelling when the hitter collides with a Solid collider for some neat 2D physics! Will be out in v1.18
This is amazing, I will be using this asset to replicate collisions on the 2D version of my custom particle system
Tweens will now be cancelled if the hitter touches a solid collider!
Added tweens
parameter to :addHitter(instance, tweens)
function! which cancels those tweens if the hitter touches a solid collider! View Docs
Added :updateHitter(index, instance, tweens)
function which updates already existing Hitters, their instance and their tweens! View Docs
Added :getHitterTweens(index)
which returns all the existing tweens of the hitter that are being played or havenāt been played yet. View Docs
:addHitter()
and :updateHitter()
function now return the hitter that was added which can be used as follows:
local addedHitter = group:addHitter(script.Parent.Hitter, { tween, tween2 })
addedHitter.index -- index of the hitter
addedHitter.instance -- the instance that was marked as the hitter, here: script.Parent.Hitter
If you have any suggestions and ideas, be sure to reply below so that I update this module often!
If you have any questions regarding the update, be sure to ask me!
Does this work with rotated GUIs?
Unfortunately, this doesnāt always work with Rotated Guis, I am planning to implement that in the upcoming version, thanks!
:updateCollider()
function to update already existing colliderās instance and solid property. View Docs
:addCollider()
and :updateCollider()
functions now return the collider that has been added:local collider = group:addCollider(someInstance, true)
print(collider) -- {index: number, instance: instance, solid: boolean}
I have also been playing around with Gui Collisions when the guis are rotated, next update will consist of gui collisions even if the guis are rotated.
as suggested by @hboogy101
I wish to make 2D game development on roblox 10x times easier for you guys!
this is pretty great, good job! will have to use this to make my gameās GUIās
Added :setZIndexHierarchy(boolean)
. The function is used to determine if the hitter will collide with colliders that have different ZIndex values. Setting it to true, will make the hitter not detect collisions with colliders that have different ZIndex value than the hitter. Setting it to false, will make the hitter collide with colliders no matter what their ZIndexes are. By default this is set to false. View Docs
This feature can be used to create Slopes in 2D Games, slanting roads, caves, objects you canāt go through but can go behind and in front of them, by changing the hitterās ZIndex. For example:
.isInCore()
function. This function is used to determine if a gui object is completely inside of the area of another gui. This function returns true if a gui is completely inside of another, else it returns false. If guiHitterās size is smaller than that of guiCollider, the function returns false. View docs
This works with tweens as well!
local GuiCollisionService = require(game.ReplicatedStorage.GuiCollisionService)
print(GuiCollisionService.isInCore(someHitterInstance, someCollider)) -- prints true if hitter is completely inside the area of the collider, else false
This function can be used to create Rhythm game scoring mechanics. For example a āPerfect hitā or a āMissā
Like that of fnf or robeats:
Minor update to .isInCore()
. It now works for rotated hitters as well!
After a fairly long wait. The update you all have been waiting for is finally out! (sorry for the long wait)
local GuiCollisionService = require(game.ReplicatedStorage.GuiCollisionService)
local group = GuiCollisionService.createCollisionGroup()
--GuiCollisionService.
group:addCollider(script.Parent.Still, false)
group:addCollider(script.Parent.Still2, false)
group:addCollider(script.Parent.Still3, false)
group:addHitter(script.Parent.Move, {})
group:getHitter(1).CollidersTouched.Event:Connect(function(hits)
group:getHitter(1).BackgroundColor3 = Color3.new(0.333333, 1, 0)
end)
group:getHitter(1).OnCollisionEnded.Event:Connect(function()
group:getHitter(1).BackgroundColor3 = Color3.new(255,255,255)
end)
Hope this update helped a few! Alongside this, I am currently working on a 2D RayCast module for you all! Thanks!
(cc: @hboogy101)
Really good module! Keep up the good work! Hopefully, Iām gonna use this for future project!