Ask questions, discuss ideas, get answers
Dennis|8749236
Posts: 239 Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:
Post
by Dennis|8749236 » Mon Mar 28, 2011 11:33 pm
Code: Select all
ObjectTemplate.create Bundle MissileTestObject_m1
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.setHasResponsePhysics 1
rem -----------------------------------
ObjectTemplate.addTemplate Plank_10m_m1
ObjectTemplate.setPosition -0.5/0/0
ObjectTemplate.setRotation 0/0/0
ObjectTemplate.addTemplate Plank_10m_m1
ObjectTemplate.setPosition 0.5/0/0
ObjectTemplate.setRotation 0/0/0
I coded a new static object to test the homing missile and try to improve it, but this **** static object won't react with anything except the vehicles and grenades..
Anyone know why this problem happened?
What is the meaning of Life?? (Don't think about it!)
Swaffy
Posts: 1715 Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas
Post
by Swaffy » Tue Mar 29, 2011 12:08 am
Can you upload a video or pictures to help me understand the issue?
Is your rocket fired from a HandWeapon?
(Forum Thread |Download) Swaffy'sMod v0.34 | Download link to come Soon™
Dennis|8749236
Posts: 239 Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:
Post
by Dennis|8749236 » Tue Mar 29, 2011 3:52 pm
Yes, you are correct, the rocket fired by hand weapon is not reacting with it..
and i have a same problem with a new radar bunker
What is the meaning of Life?? (Don't think about it!)
Apache Thunder
Posts: 1213 Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:
Post
by Apache Thunder » Thu Mar 31, 2011 9:20 pm
Does the Plank_10m_m1 object you addtemplated to that bundle also have collision physics turned on/has collision mesh?
You also only need to define one collision setting. Usually "ObjectTemplate.hasCollisionPhysics 1" is all you need to turn on collision for an object provided that object has a mesh with a collision mesh or a child object that has a collision mesh + also has collision physics turned on.
I have cameras in your head!
Dennis|8749236
Posts: 239 Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:
Post
by Dennis|8749236 » Fri Apr 01, 2011 3:48 pm
so it should be like this?
Code: Select all
ObjectTemplate.create Bundle MissileTestObject_m1
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.hasCollisionPhysics 1
rem ObjectTemplate.setHasCollisionPhysics 1
rem ObjectTemplate.setHasResponsePhysics 1
rem -----------------------------------
ObjectTemplate.addTemplate Plank_10m_m1
ObjectTemplate.setPosition -0.5/0/0
ObjectTemplate.setRotation 0/0/0
ObjectTemplate.addTemplate Plank_10m_m1
ObjectTemplate.setPosition 0.5/0/0
ObjectTemplate.setRotation 0/0/0
What is the meaning of Life?? (Don't think about it!)
Apache Thunder
Posts: 1213 Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:
Post
by Apache Thunder » Fri Apr 01, 2011 4:48 pm
Yes. Here is an example of a static object I have coded in my BFH mod:
Code: Select all
ObjectTemplate.create Bundle boatwreck
ObjectTemplate.geometry boatwreck_back_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.cullRadiusScale 5
rem -------------------------------
ObjectTemplate.addTemplate boatwreck_front
ObjectTemplate.addTemplate boatwreck_front_props
ObjectTemplate.addTemplate boatwreck_back_props
ObjectTemplate.addTemplate boatwreck_back_rails
ResponsePhysics coding is mostly reserved for stuff that has mobile physics or is expected to be destructible. For stationary statics, hasResponsePhysics code is not needed.
I have cameras in your head!
Dennis|8749236
Posts: 239 Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:
Post
by Dennis|8749236 » Sun Apr 03, 2011 4:48 pm
ok, i'll try..
thank you very much..
What is the meaning of Life?? (Don't think about it!)