#How do i stop cubes from flinging?

1 messages · Page 1 of 1 (latest)

calm zealot
#

Check video, I show the problem and cube structure in it. Keep in mind only 1 part of the cube is touching the outside world (Hitbox)-also the models primary part - and what i use to detect touched events.

I tried many studio methods, like custom physical properties, messed with massless, welds, it just doesn't stop. I hope there is some sort of script that helps solve my issue

tired whale
calm zealot
tired whale
#

Ah actually no dont set it to Vector3.zero! Might fight the velocities ummm

tired whale
#

I wanna see how you handle touched events before i can actually have a more solid assumption on a solution :3

#

How do you usually handle it as This shouldnt happen at all! Unless you have a function that helps pushes these cubes!

calm zealot
#

my merge cubes section of the server script

( Keep in mind server stores stuff, for each cube:

Id
Size
Rarity
Shapes
FinalChance
Position)

and client does visuals ( will upload client code in just a bit )

#

this client script uses a main module, uploading the merging/spawning section of that aswell

#

keep in mind i coded this often with the help of AI, am quite new to scripting

tired whale
calm zealot
tired whale
#

Is it An Anchored but when touched Unanchored function?

calm zealot
#

I don't have

#

Though i wanted big cubes to be easy to push, so i did a thing

calm zealot
#

this is cube structure, both welded to inbox

#

basepart is the solid part

#

hitbox is the invis part, and the adornee of selection box

#

now inside both of these there is Inbox

#

idk if u can see it highlighted in blue

tired whale
#

I see I see

calm zealot
#

everything else but the Inbox is massless

#

and of course the inbox is also a cube

tired whale
#

Okay so does the client own Physics and Collisions?

#

Okay so thats def a yes, So thats the main issue!

#

flinging can happen even without push code due to network ownership and solver correction

calm zealot
#

i never heard of those 2 terms before

#

is there an easy fix to this?

tired whale
# calm zealot is there an easy fix to this?

I don't really mess around wiht network ownership and solver corrections butttt... I Assume ushing stuff should be handled via Server but you should have a function on how to push these objects incase if it lags the objects as thats been a defenitely an issue for a while with server based physics with roblox objects !!

calm zealot
#

it lags like crazy on server

#

i went from server to client, back and forth many times

#

just a normal cube in workspace is extremely laggy and jittery pushing wise

tired whale
calm zealot
#

game will often have 50+ spawned at once

tired whale
#

Nevermind, it was def an issue

#

I think what you can do is make a custom pushing function but this is just my opinion on it, BUT i think theres gonna be better solutions once other scripters come at this forum post.

#

!!

#

But overall, My big assumption is “network ownership and solver correction” and there isn’t a simple script fix. This is an engine/ownership issue, and solving it usually requires redesigning how physics ownership works.

#

But this is just my huge assumption and i hope you can find out the answer soon! ^^

calm zealot
#

ty for the help

frozen bone
#

I think you’ll need to mess with the elasticity of the objects

frozen bone
#

if its too elastic itll just start jumping

#

something like what happened to you

calm zealot
frozen bone
#

in any direction

calm zealot
#

My issue is them flinging

frozen bone
#

can u send a rbxm of the cube

calm zealot
#

what do you recomend setting the elasticity to

calm zealot
frozen bone
#

ill try to figure it out and ill send u the model

frozen bone
calm zealot
#

oh alr

calm zealot
frozen bone
#

u did export as obj

#

not save to file

calm zealot
#

i think i got a rbxm

frozen bone
#

gawd dayum these cubes be moving like crazy 😭

#

i tried everything to fix it but these cubes are craay

#

crazy

calm zealot
#

I tried with studio, didn't succeed, so i just rely on scripts

frozen bone
#

I feel like you could do this just with align position and I’ll tell ya how you do it

#

Basically add an attachment to the cube and an attachment to the character

#

Add an align position (not with scripts) and attach attachment0 with the cube’s attachment

#

In the script, make it so when the character hits the cube this attachment1 gets connected with the character’s attachment

#

I guess make it so when the character jumps it gets disconnected from the cube

calm zealot
frozen bone
#

Then don’t Make the cubes massless

#

And do the rest with align position

calm zealot
frozen bone
#

🥹

calm zealot
dusky condor
dusky condor
calm zealot
dusky condor
#

is that what you wanted

calm zealot
#

no

#

try jumping on it

#

also its too hard to push

dusky condor
calm zealot
# dusky condor

my goal is:

Easy to push (even for enormous size, for example that cube scaled 7x)
Non-jittery
non-laggy
Doesn't spas out whenever you jump on it

#

you got everything but first one in that vid

calm zealot
# dusky condor

can you make it easier to push, its very nice that they are equally hard to push

frozen bone
dusky condor
#

unless you're asking for it to go flying when i barely touch it, wtf do you mean "easier to push"

calm zealot
#

actually that's good, i will mess with friction stuff

calm zealot
dusky condor
calm zealot
#

iirc massless just makes the part massless for the system its in

wanton hazelBOT
#

studio** You are now Level 9! **studio

dusky condor
# dusky condor

99% of this is just messing with the density of stuff. i also reduced friction a bit. you can either make the blocks lighter or the character's root part denser, i used 200 here for the hrp density

#

also all parts except for the hitbox are massless and collisions off since they don't affect physics simulation at all anyway

calm zealot
#

so inbox is not needed?

dusky condor
pure jetty
#

a n c h o r i n g

#

:D

dusky condor
calm zealot
dusky condor
#

generally anything affected by gravity should have some mass

dusky condor
calm zealot
dusky condor
#

yes

pure jetty
#

why no anchoring :(

dusky condor
#

anchoring is how you make a part not move

pure jetty
#

i have an anchored spinny thingy that still spinnies

dusky condor
#

ye coz you set cframe in a script, it is not physics

#

anchored = no physics

pure jetty
#

oh

#

cool

#

cya

calm zealot
dusky condor
#

look it up in the docs

#

you don't need to guess how it works.

#

in fact you can probably google them too for more in-depth explanations what they are and how they work

calm zealot
#

i assume the name of most stuff on roblox is accurate to what it does

dusky condor
#

i.e frictionweight is not obvious by its name.

#

massless doesn't work how you think it does

#

3d physics simulations are not like real life. everything irl has mass. you have no frame of reference what massless is without something having explained it to you

#

or you spend copious amounts of time trying to figure out what it does with thorough testing -- but honestly the information is so readily available you'd be foolish not to search for it.

calm zealot
#

i gotta search more things to understand what massless truly does, but i'll get there

#

does this contain absolutely everything, and is up to date?

dusky condor
#

compared to other docs i've seen, roblox is by far one of the better ones out there

calm zealot
#

i now realise how much i was overcomplicating with inbox

dusky condor
# calm zealot i now realise how much i was overcomplicating with inbox

i not sure what you mean by inbox here, but yeah that's usually the problem, overthinking and overanalysing code will make a fool out of anyone, so focus on what's in front of you. keep it simple, stupid.

KISS ("Keep it simple, stupid") is a design principle first noted by the U.S. Navy in 1960. First seen partly in American English by at least 1938, KISS implies that simplicity should be a design goal. The phrase has been associated with aircraft engineer Kelly Johnson. The term "KISS principle" was in popular use by 1970. Variations on the phra...

calm zealot
dusky condor
calm zealot
dusky condor
#

generally the only time you should be using massless is for visual things that need to move but should not interact with physics in any meaningful way.

#

e.g on a humanoid, you can set all the limbs to massless and it's fine, but you shouldn't make the rootpart massless because that's what does most of the physics interactions

#

massless can have the effect of producing infinite forces because there's no mass. it's unintuitive because no irl counterpart

#

massless also has effects on things like air resistance, lift, and drag if you were to physically simulate them, again it's like having infinite forces

calm zealot
dusky condor
calm zealot
#

i hope it'll be fixed after i do some changes and make scripts not include Inbox anymore

#

i will let u know

dusky condor
# dusky condor

just keep playing with it. i know how to do this because experience. i got that experience the same way you are getting it right now - by playing with it, reading how it's supposed to work, and tutorials.

#

building things is how you get experience, and i have built many things.

#

the only way to get that experience yourself is to build those things yourself too 👍

calm zealot
#

trying my best

calm zealot
#

1 hour debugging only to find out it was cancolide false Thumbs

dusky condor
#

yeah i didnt change anything just fixed the collision and physical properties

calm zealot
#

hm it seems like i need to add the inbox back

dusky condor
#

probably dont need it tbh

calm zealot
#

i've been stuck at this issue for 2 hrs, idk how else i could

dusky condor
#

i was lazy when checking it and this is your game not mine

calm zealot
#

it seems like welding object1 (contained in object2) to object2 will just make object1 pop out ( both are can colide true)

dusky condor
#

use weldconstraint not weld

calm zealot
#

yeah i meant weld constraint

#

oh would you look at that, welding (constraint) the bigger part ( not massless) to the smaller part ( masless), contained in the bigger part makes the model work perfectly fine

#

I hope this won't be an issue in the future, i'll do that

calm zealot
calm zealot
#

figured it out...

#

@dusky condor thanks so much for the help, now game has buttery smooth gameplay, 0 flings, everything easy to push, no warns, no errors

#

i will refer to roblox documentation as main source of information starting now

swift saddle
#

this whole time u can just make it heavier

#

😤👎

calm zealot