RUNNING WITH RIFLES
http://www.runningwithrifles.com/phpBB3/

New Vehicle
http://www.runningwithrifles.com/phpBB3/viewtopic.php?f=2&t=1446
Page 1 of 1

Author:  The Soldier [ Mon Nov 04, 2013 1:42 am ]
Post subject:  New Vehicle

OK, so I'm having some problems with a vehicle I've added, the M3 Halftrack (courtesy of harr_work). No matter what collision box settings I put in, no matter the offset, it's never set in one place. I even replace just the model and the same thing happens.

Image

Author:  pasik [ Mon Nov 04, 2013 4:35 pm ]
Post subject:  Re: New Vehicle

It's good to keep the collision box fairly close to the box defined by tires, otherwise the physics structure may end up lopsided.

It helps to look at various vehicles with debugmode on and activating the visuals with F5.

On the topic of tweaking, you can possibly make it a tad more convenient by having reload.txt file in the RWR installation directory, and list the resources one filename (no path) per line you may want to reload while in the game, and then hit F8 in the game after you've made any changes in the resources. Works nicely with vehicles, textures and meshes at least, should work with weapons too.

Author:  The Soldier [ Mon Nov 04, 2013 8:47 pm ]
Post subject:  Re: New Vehicle

Thanks for that. :) I'll see what I can do with this.

pasik wrote:
On the topic of tweaking, you can possibly make it a tad more convenient by having reload.txt file in the RWR installation directory, and list the resources one filename (no path) per line you may want to reload while in the game, and then hit F8 in the game after you've made any changes in the resources. Works nicely with vehicles, textures and meshes at least, should work with weapons too.


Now THAT is bloody useful. Why has no one talked about it here? XD

EDIT:
So now the collision model is fine. But the wheels aren't - they tend to move around when the vehicle is turned.
Spoiler:
Image

Author:  pasik [ Mon Nov 04, 2013 9:34 pm ]
Post subject:  Re: New Vehicle

The Soldier wrote:
So now the collision model is fine. But the wheels aren't - they tend to move around when the vehicle is turned.


They tend to do that to a degree. Can't remember right now if there was a specific trick to make it less so, vanilla vehicles seem at least fairly solid in that sense these days.

Is your vehicle modeled with 4 or 6 tires? Try 6. Or maybe toning down max rotation helps.

Are the tire configs balanced on z-axis? Got a funny feeling that had something to do with it too.

Author:  Master Blaster [ Mon Nov 04, 2013 9:59 pm ]
Post subject:  Re: New Vehicle

pasik wrote:
The Soldier wrote:
So now the collision model is fine. But the wheels aren't - they tend to move around when the vehicle is turned.

They tend to do that to a degree. Can't remember right now if there was a specific trick to make it less so, vanilla vehicles seem at least fairly solid in that sense these days.

Are the tire configs balanced on z-axis? Got a funny feeling that had something to do with it too.

I had this problem too. The z-axis values do seem to be the issue.

Author:  The Soldier [ Mon Nov 04, 2013 11:08 pm ]
Post subject:  Re: New Vehicle

I'm using 4 wheels (although I'd like 2 wheels and two tracks since it's a halftrack, but I haven't found out how to make tracks yet, aside from coping the tank files).

OK, I'll try the z-value.

EDIT:
OK, it stopped the really weird wheel moving. :) But now I've got this problem. I believe it can be fixed via just moving the model in an editor. But that means re-UV mapping it. :P Which I'd have to leave to harr_work since I lack that skill.

Spoiler:
Image

Author:  Master Blaster [ Mon Nov 04, 2013 11:30 pm ]
Post subject:  Re: New Vehicle

The Soldier wrote:
OK, it stopped the really weird wheel moving. :) But now I've got this problem. I believe it can be fixed via just moving the model in an editor. But that means re-UV mapping it. :P Which I'd have to leave to harr_work since I lack that skill.

You can just change the visual_offset value to move the vehicle model around without affecting collision or wheels. This did seem to have an effect on turret weapons, though, but that wouldn't be a problem for the halftrack.

Author:  The Soldier [ Tue Nov 05, 2013 5:27 pm ]
Post subject:  Re: New Vehicle

Many thanks. :)

*one crude texture later*

Spoiler:
Image


Anyways, that pretty much solves this. Thanks everyone!

EDIT:
OK, one last thing. Is it possible to make this an actual half track? As in, give it wheels and tracks like the tank?

Author:  pasik [ Tue Nov 05, 2013 7:12 pm ]
Post subject:  Re: New Vehicle

The Soldier wrote:
OK, one last thing. Is it possible to make this an actual half track? As in, give it wheels and tracks like the tank?


Not sure if anyone has tried it. By a quick glance in the code it could very well be possible as a visual thing at least. Actual tracked steering can't be mixed with tire steering, though.

Author:  The Soldier [ Tue Nov 05, 2013 7:24 pm ]
Post subject:  Re: New Vehicle

I'm sure this would be wheeled steering. Visual is fine.

Thanks, I'll fiddle with the code. :)

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/