Are physics based npcs possible in roblox? If so, how? The reason I am asking is beacuse I am looking for a way to simulate egg physics. I would like the egg to roll and wobble.
yes it’s very possible lol
Pathfinding https://create.roblox.com/docs/characters/pathfinding is a pretty solid tool created by ROBLOX, and then you can simply customize the movement of these egg people
I am confused on how to do it?
maxcharlimit
Just out of curiosity, how much experience do you have with programming? I can give you some YouTube videos if you want to explain it a bit better, the site I linked does teach the basics of pathfinidng.
I am asking about physics based npcs not pathfinding. I want the egg to roll like an egg and move like an egg.
Sorry im a little sleep deprived, im just offering a hypothetical solution if you want these NPCs to be able to free roam as it seemed like your question was a matter of complexity
fortunately roblox already has semi-realistic physics when it comes to circular objects, so if you want to make an egg NPC, you can realistically just move it around using cframe with a rotational effect, and maybe anchor and unanchor it after its done moving so it has that silly egg effect
I am unsure how to do that which is what i am asking about
Also, i don’t know how to keep those physics when using pathfinding.
Gotcha
Utilizing CFrame you can make an object move from point A to point B, as well as change it’s orientation (rotate)
Utilizing pathfinding you can have your silly egg NPCs have an area they can walk around in so that way the egg physics can be a bit more controlled and less of a buggy mess.
My whole anchoring/unanchoring idea is basically dependent on if the eggs are making an effort to move or if they’re just chilling
How do anchor/unacnhor it is i guess what i am asking
Okay, I think we should probably do a little bit of fundamentals first before we get into the big stuff like creating your own physics engine.
Anchoring is basically what stops items from interacting with gravity, AKA stuff just stays in place no matter what.
I have a great Youtube series from AlvinBlox I’d totally reccomend to a new coder, it’s what got me started years ago!
But, for your question on anchoring/unachoring a part you would just write this as a script inside of a part:
script.Parent.Anchored = true -- THIS MEANS IT IS ANCHORED
script.Parent.Anchored = false -- THIS MEANS IT ISNT ANCHORED!
okay actully waht i am asking is how do i make the npc more bouncy like rubber. well acc i found out using google so lemme see if this thingy works or not
Okay man, good luck!
If it doesn’t work out, please don’t give up, coding takes a while to learn.
It’s almost 2 AM for me, so I’m going to bed. You can do it!
welp. it didn’t work out. lmao. elasticity is having 0 effect on the bounciness. It is 2am for me right now too lol.
Maybe try placing a linear force instance inside the egg and make its direction face where ever the player wants to go