Have you finished this as of yet? Would it be possible to create cars if that is implemented?
I haven’t been able to work on Nature2D for a couple of months due to school. I’ll try to complete it whenever I have time!
Hey, when you are able to work on this again, could we expect to see improvements to constraints? Mostly in the realm of their actual physics interactions. Ropes don’t conserve momentum all that well and act more like a self-correcting line, the same with the other constraints.
(ex. a body attached to a rope when dropped from a 90-degree angle should swing back and forth, but instead it slowly goes back to a straight down position.)
This is awesome. How could I store a GUI on the server and replicate it to all other players to make a multiplayer game?
RemoteEvents, basically player A sends data to server and server sends it back to every client (You have to come up with a custom networking solution, so you need to validate important stuff on server or on the player that is managing the game idk)
Now important note is that you have to send packets constantly and currently Roblox doesn’t have reliablity types for RemoteEvents so until they add that you will be stuck with the risk of lagging your game (even tho FireServer() → FireAllClients() directly should minimize some delays since the server only sends the packets to other clients instead of replicating it itself but still)
I looked around and found this one solution. How we reduced bandwidth usage by 60x in Astro Force (Roblox RTS)
It’s for a RTS where they have to coordinate the movement of hundreds of units.
That’s also interesting even tho i kinda don’t know much about networking and optimizations but could be useful for your use case
How can I stop player movement from being slippery using ApplyForce? it works fine, but the movement isn’t too precise and too slippery, and when you run into objects the player object bounces. I’m thinking of a system similar to Undertale’s where the player completely stops moving as soon as you stop holding the arrow keys
Edit: also would it be possible to make a scrolling map? Like, you can walk off the canvas and like it keeps going and the camera keeps following the player
hi, is it possible to create 2D world? where player can move and the world moves too?
attempting to get the x and y of a body errors, is there any reason why this happens i used the exact same code
If you are still working on it, the way to change the force would be through looping through the vertices of the rigidbody and changing the force:
for _, v in pairs(rigidbody.vertices) do
v.forces = Vector3.new(v.forces.X,0)
end
It’s been almost an year since I worked on this, I decided to create a place where you can find and play around with all my interactive Nature2D demos that I’ve showcased in the past. I’ve added 10 demos so far, will add more along the way.
can you make it uncopylocked? i cant really figure out how to make this work
Sure, I’ll clean up the code and make it uncopylocked soon
You should add a swept physics mode or a constant frame rate mode to get rid of some of the inconsistencies when objects collide (pushing into each other etc) however this late into the engines development might make it a real pain to get working
alright, thanks.
I’m getting an error when making any type of constraint:
local engine = require(game:GetService("ReplicatedStorage"):FindFirstChild("Nature2D"))
local GAME = script.Parent
local Scenes = GAME.Scenes
local GameScene = Scenes.GAME
local Plugins = require(game:GetService("ReplicatedStorage"):FindFirstChild("Nature2D"):FindFirstChild("Plugins"))
local Categories = GameScene.ITEM_UI.Categories
local Items = GameScene.ITEMS
local physics = engine.init(GAME)
local Dragger = Plugins.MouseConstraint(physics,10)
local Canvas = physics:CreateCanvas(Vector2.new(0,0),workspace.CurrentCamera.ViewportSize, GameScene)
local ground = physics:Create("RigidBody",{
Object = GameScene.GROUND,
Collidable = true,
Anchored = true
})
local Box = physics:Create("RigidBody",{
Object = GameScene.Cube,
Collidable = true,
Anchored = false
})
--Initialize Categories--
--Ragdolls
local Ragdolls_Category = Items.Ragdolls
local Ragdoll_Names = {"Default"}
for index,item in pairs(Ragdoll_Names) do
local ragdoll = Ragdolls_Category:FindFirstChild(item)
if ragdoll then
local head_visual = ragdoll:FindFirstChild("Head")
local root_part_visual = ragdoll:FindFirstChild("RootPart")
local head = physics:Create("RigidBody",{
Object = head_visual,
Collidable = true,
Anchored = false
})
local root_part = physics:Create("RigidBody",{
Object = root_part_visual,
Collidable = true,
Anchored = false
})
local head_root_constraint = physics:Create("Constraint",{
Type = "Rod",
Point1 = head:GetVertices()[3],
Point2 = root_part:GetVertices()[1],
Visible = true,
Thickness = 3,
Color = Color3.new(1,1,1)
})
end
end
physics:Start()
This area:
local head_root_constraint = physics:Create("Constraint",{
Type = "Rod",
Point1 = head:GetVertices()[3],
Point2 = root_part:GetVertices()[1],
Visible = true,
Thickness = 3,
Color = Color3.new(1,1,1)
})
I don’t see any problems in your code, can you show the full error?
all my braincells are focused AND I UNDERSTOOD (!!), I will now begin the development of a collection of arcade games adapted to Roblox thanks to your plugin! I look forward to the next update !!
( and to some of the patches too )
check out the website btw… helps a lot
Wrote a blog on a Nature2D project I had been working on last week. Trusses with Nature2D! Check it out here on my website: jaipack17.github.io/voyage/trusses