Gilmer Posted June 13, 2011 Share Posted June 13, 2011 Hi guys... I've been noticing that in sometimes when the car, collide with a static model, the car gets a strength, and flies out in scene. I recorded a video, for you to see better. In the script car, I'm using this parameters: local suspensionlength=0.2 local springconstant=20.0 local springdamper=650.0 object.model:SetKey("mass",20.0) Someone can tell me, what's happening, and if have something that i can change, to fix this? Quote Link to comment Share on other sites More sharing options...
macklebee Posted June 13, 2011 Share Posted June 13, 2011 This reminds me of the issue we had at one time with the controller getting bounced back erratically in the tunnels.sbx. It had to do with the complex mesh at some of the corners of the tunnel walls. I think Josh has already suggested to you that the headlights seem to have way too much detail. I would try to create a simpler mesh of the truck, use phygen to create the phy body, then use that as the physics body of the truck model. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Canardia Posted June 13, 2011 Share Posted June 13, 2011 I think it's a Newton problem, since Newton doesn't have behavior control on intersecting bodies, so it gives them usually huge force and they fly away. Bullet (and probably PhysX too) has detailed controls how bodies behave when they intersect. Fixed in LE3 Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Pixel Perfect Posted June 13, 2011 Share Posted June 13, 2011 Newton behaves like this when the bodies penetrate each other, you get a massive reaction of force. It used to hurl me sometimes completly off the level. Pauls advice sounds about right from what Josh has said in the past. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
macklebee Posted June 13, 2011 Share Posted June 13, 2011 You might want to also set the phy body to have swept collision as well. There used to be a bug with newton with fast moving objects passing through each other but has been fixed. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Gilmer Posted June 13, 2011 Author Share Posted June 13, 2011 Thanks guys.. So, I was used the phygen to create the phy body. This is the mesh used: About the headlights, in reality, is just two point lights and not the car's headlight,that's why I have not changed.... I've noticed that in sometimes with the viperscout model, this happen too.. Quote Link to comment Share on other sites More sharing options...
macklebee Posted June 13, 2011 Share Posted June 13, 2011 then take a look at the phy body of the railing model and see if you can make its body simpler... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
macklebee Posted June 13, 2011 Share Posted June 13, 2011 er... are you actually loading pointlight models and attaching them to the car? you know you can just use the CreatePointLight() command without actually having to use the editor model, right? in this case though, i think i would use spotlights for headlights... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Gilmer Posted June 13, 2011 Author Share Posted June 13, 2011 I said wrong, I'm using spot light in reality lol I'm loading the model spotlight, because I need that it use yout script too, the light_spot.lua. And I dont had sure if with this function it run the script, but I'll try. And I'll change de phy body too. thx macklebee.. Quote Link to comment Share on other sites More sharing options...
macklebee Posted June 13, 2011 Share Posted June 13, 2011 well i would just rewrite the vehicle script to include the placement and settings of the two spotlights. just use the code from the spotlight lua script to set all of your settings for them and that way you don't have to worry about the models... because now it makes me wonder if the spotlight models are getting a collision response set to them accidently from being parented to the truck... maybe not... but in any case the models are not needed as everything can be coded directly. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Gilmer Posted June 14, 2011 Author Share Posted June 14, 2011 So macklebee, I removed the spotlights and try again. The problem continue. I recorded again, to u see.. I really can't imagine which can be..and this problem is preventing us from continuing with a one-year project, that practically we are finalizing.. =/ Quote Link to comment Share on other sites More sharing options...
Richard Simpson Posted June 14, 2011 Share Posted June 14, 2011 Could you not make the fence PHY file a convex hull? This will make the physics body just a bounding box, and wont allow the car to get into the gaps in the fence. Quote Intel core 2 quad 6600 | Nvidia Geforce GTX460 1GB | 2GB DDR2 Ram | Windows 7. Google Sketchup | Photoshop | Blender | UU3D | Leadwerks Engine 2.4 Link to comment Share on other sites More sharing options...
Gilmer Posted June 14, 2011 Author Share Posted June 14, 2011 thank you Richard, I did this and it's work now. At least in the tests that I make, not happened the problem. I'll continue with the test here, if occurs again, I'll post here. Thanks guys.. Quote Link to comment Share on other sites More sharing options...
Josh Posted June 14, 2011 Share Posted June 14, 2011 That spring constant looks WAY too high, and would result in the bouncing behavior you see here. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.