of     2   
chevron_rightchevron_rightchevron_right

arundel
#95063492Tuesday, April 16, 2013 7:33 PM GMT

Don't know if it exists yet, and I have no idea why I'm doing this, but here it is: mesh collision detection. All types of special meshes which are in the site's database can be made walkable with no lag at all. You have to play around with the variables in the script if you want succesfull walkable collision. Right now it only works for your character. If you insert the script, enable it and you're ready to walk the example mesh. You've got to watch out when opening the script: lot's of vertex coordinates may freeze your pc if you do. (roblox's new update where you have wordwrap causes the problem) The script takes the mesh's vertices and converts them into a voxel grid. Where-ever you walk, your torso's position is rounded to the nearest table of the diameter or "gap" between each voxel and the surrounding voxels. That way whenever you get close to a polygon, a brick is put into the place of the voxel and acts as a walkable object. Tell me what you think. http://www.roblox.com/Mesh-Collision-Detection-item?id=112574385 - Arundel.
Sharksie
#95063640Tuesday, April 16, 2013 7:35 PM GMT

10/10 would use this on every mesh and crash my game
RenderSettings
#95063903Tuesday, April 16, 2013 7:39 PM GMT

Why do you create the walkable part at runtime instead of instancing all the vertex points at once and let the roblox engine handle? It sounds like that would force a lot of Lua-sided math which is probably slower then roblox's C sided maths.
arundel
#95064688Tuesday, April 16, 2013 7:49 PM GMT

@RenderSettings, the walkable parts are created once and stored. All vertices are put into a voxel grid once, in the beginning. There's not much math involved with instancing a few parts and position them accordingly to a pre-made grid.. The grid only takes up a tiny bit of memory, and the few parts take up a tiny bit of the fps. How would you possibly want to do this on the c-side?
RenderSettings
#95064883Tuesday, April 16, 2013 7:51 PM GMT

I meant, instead of instancing/parenting parts when you get close just parent them all at once and let roblox's physics do the collision calculations.
arundel
#95065738Tuesday, April 16, 2013 8:01 PM GMT

@Rendersettings, the parts are pre-made and stored in limited amounts. Let's say I have 64 parts (4*4*4 rows), then 64 is the maximum amount needed for collision detection, no matter the mesh size. If I were to parent all parts of the mesh, we could be talking about a few hundred thousands, so no, it's not a good idea to parent all of those. I don't know why you'd want that. Roblox is already doing the physics calculations on those 64 parts. This grid and nearest table rounded method is highly efficient, unless there's a memory leakage..
kirkyturky12
#95066697Tuesday, April 16, 2013 8:13 PM GMT

This script is so useful! You know, if I knew how to get the vertices of other meshes... Oh, and, reported for spam.
arundel
#95067535Tuesday, April 16, 2013 8:22 PM GMT

@Kirky: get the mesh ID of a mesh and paste it in a script's linkedsource. Now open the script. :)
TheMyrco
#95069513Tuesday, April 16, 2013 8:43 PM GMT

O.o Ik opеndе dе Script еn m'n ogеn puildе al uit van diе langе tafеl ._. еn ik hеb gееn idее wat еr allеmaal gеbеurt xD Ik dеnk dat hеt voor mij bruikbaardеr zou zijn als ik zou wеtеn wat еr allеmaal gеbеurt xD! Ach ja, misschiеn ooit. Lеuk jе wееr tе ziеn, trouwеns - ееn van dе wеinigеn mеt hеrsеns hiеr. Hoе lang duurdе jе hеt еigеnlijk dit allеs tе schrijvеn?
TheMyrco
#95069776Tuesday, April 16, 2013 8:46 PM GMT

Bah sommige zinnen formuleerde ik echt raar...
lombardo2
#95070019Tuesday, April 16, 2013 8:49 PM GMT

Not again myrco...
TheMyrco
#95070094Tuesday, April 16, 2013 8:50 PM GMT

Mhm?
kirkyturky12
#95071096Tuesday, April 16, 2013 9:02 PM GMT

Why is it that when I change the scale of the mesh, the collisions quit working? Oh, and, reported for spam.
arundel
#95072429Tuesday, April 16, 2013 9:16 PM GMT

Oh I forgot to tell, I think that the scales can be almost any number, but it should be in the table of "diameter". If diameter=5 then scale 30 is ok cuz it's in the table of 5. That goes for all variables in the script I think. I tried scale {400,400,200} (takes a while to load!) but it works. @Myrco, heeyz. dankje. het koste een paar avonden om het script te maken. ja ik zie niet veel relevante discussies in deze forum. ;p waar denk jij dat mesh collision detection handig voor kan zijn?
lah30303
#95076450Tuesday, April 16, 2013 9:58 PM GMT

Quick, someone upload an entire map as a single mesh :D So many vertices...
StealthKing95
#95077549Tuesday, April 16, 2013 10:09 PM GMT

@lah There is an official roblox mesh that is the entire quake 3 map "the longest yard"
TheMyrco
#95135808Wednesday, April 17, 2013 4:12 PM GMT

@aru: Ik weet niet waar 'ie handig voor zou zijn aangezien ik het amper begrijp =/
thedestroyer115
#95136913Wednesday, April 17, 2013 4:38 PM GMT

@stealthking :o orly
Candymaniac
#95136968Wednesday, April 17, 2013 4:39 PM GMT

Halo, leer mij nederlandse alsjeblieft! "No, you were not downloaded. You were born!"
TheMyrco
#95137168Wednesday, April 17, 2013 4:44 PM GMT

@candy: Stop maar meteen. @Arundel: Maar je moet wel weten dat ik het script niet echt heb doorgenomen. mhm hoe oud ben je nu eigenlijk? Ik schat je 16/17. :O
Candymaniac
#95137219Wednesday, April 17, 2013 4:46 PM GMT

Why? I genuinely want to lol. "No, you were not downloaded. You were born!"
TheMyrco
#95137328Wednesday, April 17, 2013 4:48 PM GMT

I meant that google. Seriously, nederlandse (which should be Nederlandse btw) is Dutch as an adjective.
arundel
#95210754Thursday, April 18, 2013 2:08 PM GMT

Umg I tried it with the quake map: http://www.roblox.com/asset?id=77173224 And it works great, set scale to {1,1,1}, map_width/height to 5000, and then wait for like 10 minutes for it to load. Coolz, a totally walkable quake map. :D (warning, your virtual memory will take up like 800 mb.)
StealthKing95
#95214828Thursday, April 18, 2013 3:53 PM GMT

How am I supposed to copy the vertice data from a script with a linkedsource if roblox cant open the script without crashing. I mean, it can open it without crashing after a while, but you cannot scroll down and it only counts lines 1-3
TheMyrco
#95227009Thursday, April 18, 2013 7:55 PM GMT

Er die link werkt niet. Maar vertel eens, hoe werkt dit? Ik heb nog steeds geen tijd om het Script door te lezen q_q

    of     2   
chevron_rightchevron_rightchevron_right