Nature2D - 2D Physics Engine for UI Elements

Hi I’m encountering an issue. Whenever I’m trying to make the canvas in the middle of my screen, all the RigidBody’s move slightly and messes up the hitboxes. I’ve tried using :CreateCanvas() but to no avail.

Tried
Engine:CreateCanvas(Interface.Main.AbsolutePosition, Interface.Main.AbsoluteSize, Interface.Main) and Engine.canvas.frame = Interface.Main

Centered + Code preview

Non centered

Main frame / Canvas
image

Centering the main frame/canvas via offset or scale causes this issue, any help or feedback would be amazing!

1 Like

What is the process to create ropes?

2D Roblox (this stuff is crazy i can make 2D Games so easy now)
(4) 2D Roblox - Roblox (WASD for controls)

Try Using (4) GuiCollisionService - Roblox its great for player physics

im trying to make poly bridge with nature 2d how would get the ui element from the a point that i clicked on or something

Is it possible to use this in the background for a pixel-based rendering engine rather than just using UI frames to display it?

I want to try this out with CanvasDraw

1 Like

what kind of superpower is this!?

Hey! I’ve been experimenting around, and I’ve been using the implemented mouse drag module, and I’m having trouble with keeping the object straight.

Also instead of the object snapping to a vertice, I want it to snap to the middle of the object

Basically how a normal drag system for ui is (without physics).

1 Like

I’m trying to make image labels have a rigid body but their image hitbox is not accurate to the image, the only way I can think to get around this is by parenting a frame accruate to a hitbox I’d like. Although how would my RigidBodies look if I want to do this?

1 Like

Thanks, I’ll try this.

don’t mind this spoiler btw

1 Like

Will someone mantain this somehow and bugfix this?
I also liked this, so why not explain how it works to others so they can edit to their liking this module?

1 Like

I have been trying to make a 2d shooter game with this module and I wanted the player to rotate with the mouse position. But every time I run it, I get the following error:

I have attached my script here:

Edit: Whenever I change the value in RigidBody:Rotate(Value: Number), it shows an error that the value has to be a Vector2, got Number

1 Like
local keys = { W = false }

UserInputService.InputBegan:Connect(function(input, isTyping)
	if isTyping then return end

	if input.KeyCode == Enum.KeyCode.W and not keys.W then
		keys.W = true
    end
end

if Keys.W == true then
   player_element:ApplyForce(Vector2(-1,0)
end

UserInputService.InputEnded:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.W then
		if keys.W == true then
			keys.W = false
		end
1 Like

My collision is weird

1 Like

Hey, My two UI elements seem to not be colliding properly.




That is my setup. Please lmk if im doing anything wrong.

1 Like

MAKE IT THEN I WANT TO SEE IT AHHHH
Anyway
Good concept…
But how?

1 Like

Same lol
We had the same thought…

1 Like