Modified tank destruction

Ask questions, discuss ideas, get answers
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Modified tank destruction

Post by Vilespring »

It just doesn't collide with vehicles in the first place, so it's kind of odd.
I'm wondering how come the turret spins constantly around whatever axis it wants, like the terrain only collides with one point on the turret.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Modified tank destruction

Post by Vilespring »

Okay. I fixed the issue of spinning and (I think) phasing through buildings using invisible wheels.
Now, I'm thinking to solve the problem of vehicle collision is... (help me god) adding an invisible kettenkrad hull! :lol:
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Modified tank destruction

Post by Swaffy »

Post the code to your turret object.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Modified tank destruction

Post by Vilespring »

Code: Select all

rem *** TigerDestroyedTurret ***
ObjectTemplate.create Bundle TigerDestroyedTurret
ObjectTemplate.geometry Tiger_Tow_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.mass 1000
ObjectTemplate.destroyed 1
rem ObjectTemplate.sinkInToLandAfterDeathSpeed 1
ObjectTemplate.timetoliveafterdeath 60
ObjectTemplate.fadeAtTimeToLiveAfterDeath 0
rem --------------------------------------------------
ObjectTemplate.addTemplate e_FireSmallYellow
ObjectTemplate.addTemplate TigerGunBase
ObjectTemplate.setPosition 0/0.325/1.295
rem ObjectTemplate.addTemplate 
ObjectTemplate.addTemplate TigerTowerHatch
ObjectTemplate.setPosition -0.792/0.95/-0.232
ObjectTemplate.addTemplate tigerturretrubble
ObjectTemplate.setPosition 0/0.5/0
tigerturretrubble is the invisible wheel set for stability on the ground.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Modified tank destruction

Post by Swaffy »

Everything I've read so far seems to aim towards the collision mesh for "Tiger_Tow_M1"...
I see you have response and collision physics set, that's good.

... Okay, I looked at the vanilla game's wreckages code to see what we might be missing here. Have you tried out this line?
  • ObjectTemplate.sinkInToLandAfterDeathSpeed 0.1
You have these lines ...
  • ObjectTemplate.timetoliveafterdeath 60
    ObjectTemplate.fadeAtTimeToLiveAfterDeath 0
... but I think those are for PCOs!

(Vanilla code for Spitfire wreck)

Code: Select all

ObjectTemplate.create Bundle Wreck_Spitfire_3_m1
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.geometry Wreck_Spitfire_3_m1
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.destroyed 1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.sinkInToLandAfterDeathSpeed 0.1
ObjectTemplate.mass 1200
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Modified tank destruction

Post by Vilespring »

Maybe it's the turret is just missing the collision mesh 2. I can live with that, with some invisible garbage...
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Modified tank destruction

Post by Vilespring »

maybe it's these two lines....

Code: Select all

ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.setHasResponsePhysics 1
has "set" at the beginning.
BF 1942 can be so picky :roll:
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Modified tank destruction

Post by Swaffy »

Has anything changed by using those two lines?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply