generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Physics Engine Issues

Previous Thread :: Next Thread 
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
04 Jun 2016 04:57 PM
I've posted about this physics engine that I'm working on before, but still, I can't seem to get it right, and I have no idea what to do. The set up for the game is very simple, just make sure there is a part in the workspace called "Ball". The issue is that whenever the bounce value is set to 0, the physics start to act funky, put the ball over a ramp and you'll see what I mean, since usually the ball slides UP the ramp instead of down it. Also note that gravity has been turned off.

If someone can tell me what I'm doing wrong, I would greatly appreciate it.

Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
04 Jun 2016 04:59 PM
Roblox won't allow me to post the entire code, so here it is multiple posts:

local t1,t2=0,0;
vec3=Vector3;
vec2=Vector2;
rs=game:GetService("RunService");
gravity=Vector3.new(0,-9.8,0);
collisionIterations=3--How many collision interations should be done

local shapes={};
shapes.Box={Verts={
vec3.new(.5,.5,.5),
vec3.new(-.5,.5,.5),
vec3.new(.5,-.5,.5),
vec3.new(.5,.5,-.5),
vec3.new(-.5,-.5,.5),
vec3.new(-.5,.5,-.5),
vec3.new(.5,-.5,-.5),
vec3.new(-.5,-.5,-.5)},
Faces={
{1,2,3},
{2,5,3},
{1,3,7},
{1,4,7},
{5,2,8},
{2,6,8},
{1,4,2},
{4,6,2},
{5,8,7},
{5,3,7},
{6,7,8},
{6,4,7}
}};
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
04 Jun 2016 05:03 PM
Okay, nevermind. I can't even post the stupid code here anyway so I guess I'm SOL.
Report Abuse
jbjgang2 is not online. jbjgang2
Joined: 07 Feb 2010
Total Posts: 8948
04 Jun 2016 05:08 PM
use pastebin and just post the end of the link (the '/' and numbers after it)
Report Abuse
jbjgang2 is not online. jbjgang2
Joined: 07 Feb 2010
Total Posts: 8948
04 Jun 2016 05:10 PM
also commenting the code to let us know what is what helps immensely
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
04 Jun 2016 05:12 PM
You are a life-saver, I didn't even think about using pastebin. Number thingy is /hwa1dVt8
Report Abuse
jbjgang2 is not online. jbjgang2
Joined: 07 Feb 2010
Total Posts: 8948
04 Jun 2016 05:29 PM
Im really not sure whats up with that man.

It could be theres a misplaced operator somewhere but im not really sure.
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
04 Jun 2016 05:35 PM
I don't think so. I doubled checked my math and even posted some of the math I was doing here, and people said it was fine. Thanks for trying.
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
04 Jun 2016 06:47 PM
bump
Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
06 Jun 2016 04:45 PM
bump[2] I really hate to bump this again but I seriously need help, I've done everything I can think of but it still produces the same results. However, I have singled it down to the parallel motion that is funky, and I believe it has something to do with the collision detection, since it behaves a little bit better with only 1 collision iteration. But I still don't have a clue as to how one should go about fixing this.
Report Abuse
glurbman is not online. glurbman
Joined: 02 Nov 2010
Total Posts: 1903
06 Jun 2016 05:18 PM
maybe its just roblox physics issues ..how good and aggressive ya ever written your own physics ->Roblox engine will always calculate any phsical movement by its own before your
script can even think about taking over the balls behavior ..and the thing with roblox engine physics is that those physics change from update to update ..and this very ...very often .....so your own physics could been broken after roblox made custom part physics behavior defaukt or the PGS solver as default .,.also maybe ya just made something that suddenly produces minor lag which will drastically affect your scripts own physics ....

i just dont know ....


Report Abuse
xXIcanthinkofanameXx is not online. xXIcanthinkofanameXx
Joined: 05 May 2012
Total Posts: 857
06 Jun 2016 06:01 PM
^ I very highly doubt it. It is not roblox. Did you even look at my code?
Report Abuse
glurbman is not online. glurbman
Joined: 02 Nov 2010
Total Posts: 1903
23 Jun 2016 05:10 AM
well i didnt saw ya code ..but infact ..once ya code gets too complex it may get laggy and during this short lag spikes while ya code shortly pauses ..because roblox has an script handler which allow short sleep times ..well now while ya code doesnt respond Roblox physics takeover and ya ball missbehaves ...


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image