Jump to content

Strange reaction with vehicle!


Gilmer
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

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

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 :(

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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.

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

Thanks guys..

So, I was used the phygen to create the phy body. This is the mesh used:

 

2010jg9.jpg

 

About the headlights, in reality, is just two point lights and not the car's headlight,that's why I have not changed.... :(

 

2joft.jpg

 

 

I've noticed that in sometimes with the viperscout model, this happen too..

Link to comment
Share on other sites

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...

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

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..

Link to comment
Share on other sites

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.

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

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.. =/

Link to comment
Share on other sites

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...