Pelican collision

Post Reply
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Pelican collision

Post by Shadow07 »

I've read every existing post about pelicans on every existing halo modding forum. I've even tried digging up pages using the waybackmachine. Did anyone ever successfully figure out how to get sbsp collision on the pelican?
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

To a certain extent yes...

Heres what I remember:

The sbsp collision for the pelican is a sphere. You can find the data for this in the phmo tag.
The main problem is that changing this other results in the pelican spinning out of control when you are flying it.
With this in mind, what you want to do is find what change you can make which gives you the result you are after without this happening.
Ultimately, it doesn't matter if the sbsp collision isn't accurate, what matters is: can you make the pelican sit up right, so you can get in it?
There are possible solutions to this issue.

1. You can sit the pelican on a mach (which is fine if you have a map made of them, otherwise this is a bit lame)
2. I think there might be an always up right flag somewhere but I could be wrong...
3. Replace the sphere with a box (I haven't actually tried this so it might not work, but if it works, it is the closest you will get to perfect)
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

Took a quick look at a map, cause this is something which has always interested me and i just couldn't not look again..

Try this:

In the Rigid Bodies reflexive, change Motion Type to Box and change Shape Type to either List or Polyhedron.
(Try a few different combinations of these changes and post the results please)
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

XZodia wrote:Took a quick look at a map, cause this is something which has always interested me and i just couldn't not look again..

Try this:

In the Rigid Bodies reflexive, change Motion Type to Box and change Shape Type to either List or Polyhedron.
(Try a few different combinations of these changes and post the results please)
Excellent I'll try this tonight and hopefully post results by tomorrow. Thanks a ton for the ideas.
Image
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

Ok so far the best result I've had is with the motion type: box and the shape type: polyhedron. This allows the pelican to sit still, but it has a tendency to lean backwards with the nose pointed up at about a 45 degree angle. I increased the Center of Mass X to 0.8 and that resulted in a pelican that is oriented correctly and not moving, however when you fly the thing and land it, it rocks back onto the tail again, and no matter how many times you flip it it won't go back to the correct orientation. That being said you're definitely onto something.

As an aside I'm having trouble with damage. I can't get the thing to damage the driver's shield when it takes damage. I looked at Aerial to find out how to make it destroyable, but I can only seem to destroy it when it's unmanned.

Also I can't figure out how to make it possible to lock onto it with rockets. I've cloned a chunk in the mode tag and then overwrote it with the target_driver chuck from another vehicle but no dice.
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

For Driver damage you need to add the Damage Seats reflexive in hlmt->New Damage Info (1 chunk per seat, I suggest looking at the tank for reference)
You may also need to add chunks to hlmt->New Damage Info->Damage Sections and hlmt->New Damage Info->Damage Sections->Instant Responses

For Rocket Lockon, you need to add the hlmt->Targets reflexive (1 chunk per target) and you will need to enable "Locked By Human Tracking"


Possible fix for the collision:

Shape Type = List
Then
List Shapes, chunk 0, Shape = -1(this should remove the sphere but leave the rest of the collision)


Also, you could try
vehi->Overdampen Cusp Angle / Exponent
or
vehi->Min/Max Flipping Angular Velocity
or
vehi->Gravity Scale
to fix the flip
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

XZodia wrote:For Driver damage you need to add the Damage Seats reflexive in hlmt->New Damage Info (1 chunk per seat, I suggest looking at the tank for reference)
You may also need to add chunks to hlmt->New Damage Info->Damage Sections and hlmt->New Damage Info->Damage Sections->Instant Responses
Ok I got this working.
XZodia wrote: For Rocket Lockon, you need to add the hlmt->Targets reflexive (1 chunk per target) and you will need to enable "Locked By Human Tracking"
Still having difficulty with this. I'm not sure which markers to use for the chunks. I've tried target_driver, driver etc and nothing will let me lock onto the driver.

EDIT: I solved this by copying the target_driver chuck under the Marker Group reflexive in the Mode tag of the scorpion and adding it to the pelican. This allows me to lock onto the center of the pelican which meets my purposes. Would still like to know how I can get a targeting region directly on the driver though.
XZodia wrote: Possible fix for the collision:

Shape Type = List
Then
List Shapes, chunk 0, Shape = -1(this should remove the sphere but leave the rest of the collision)
These results are similar to polyhedron, but slightly better. The pelican spawns in the correct orientation, but after flying it and landing it it still leans it's tail back into the ground with the cockpit pointed up at a 45 degree angle.
XZodia wrote: Also, you could try
vehi->Overdampen Cusp Angle / Exponent
or
vehi->Min/Max Flipping Angular Velocity
or
vehi->Gravity Scale
to fix the flip
Got the flip squared away with Min/Max angular velocity.

I'm bound and determined to figure this out so keep throwing out ideas and I'll keep testing them.
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

Shadow07 wrote:
XZodia wrote: Possible fix for the collision:

Shape Type = List
Then
List Shapes, chunk 0, Shape = -1(this should remove the sphere but leave the rest of the collision)
These results are similar to polyhedron, but slightly better. The pelican spawns in the correct orientation, but after flying it and landing it it still leans it's tail back into the ground with the cockpit pointed up at a 45 degree angle.
I had a report from another modder that the -1 caused the game to freeze, are you sure you did this correctly?

An alternative to try is swapping the values of the first and last chunk in the list shapes reflexive, then set list->child shape size to 8
This should achieve the same but without the need for the -1 (which i am told freezes the game...)
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

I'm positive I did it as directed:

Shape Type: List

Then under the List Shaped reflexive: Chunk 0 (sphere): -1

No freezing. I did however leave the movement type as Box from the previous trial. Should I try it again but with movement type as sphere?
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

Well I'm rather out of ideas in that case
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

XZodia wrote:Well I'm rather out of ideas in that case
Bummer. I'll keep trying random things and report back here with my findings. Thanks for the ideas.
Image
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Re: Pelican collision

Post by CaptainPoopface »

If you can live with the crudeness of it, you can set the phmo to be a box, then resize and reorient the box so it approximately fits the pelican. And I mean set it's phmo to the phmo of one of the crates from Zanzibar, or whatever crate is used for ICanHasCubez. Then it will sit on the BSP with the greatest of ease. It will also bump into the BSP and other obstacles based on its dimensions, so there is some trial and error involved.

I did this for a mod where everyone is using a variant of the prophet's throne. It spun around constantly because it was a sphere. Then I set it to a box, resized it, and it worked like a charm.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

Ok so in the rigid bodies reflexive I've changed the shape type to polyhedron, Center of mass X to 1.5 and Center of mass Y to -4.5E-05. This results in a pelican that sits upright and rotates to the correct position when you land it. The pelican sits a little low to the ground with all 3 landing wheels below the ground. Does anyone know how to get it to sit a little higher on the bsp?

As a side note, I'm struggling to get pelican sounds in the map without breaking it. Does anyone have any guidance here? I've attempted duplicated other sounds, renaming them to the appropriate pelican sounds and then injecting pelican sounds I've extracted from other maps like Aerial. This was a non starter.

As another aside note, would it be possible to take an item that does have bsp collision, like a warthog tire, and attach it to the pelican's landing gear and then null the shaders?
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

OMG the center of mass hack is genius btw.

Entity should be able to handle transferring sounds fine, just remember to tick Sounds when you extract/build.

There is no known method of attaching collision, but you could remove the landing gear completely by setting the bone scale to zero in the mode tag.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

XZodia wrote:OMG the center of mass hack is genius btw.
Heh thanks, just a shot in the dark.
XZodia wrote: Entity should be able to handle transferring sounds fine, just remember to tick Sounds when you extract/build.
Woah no way! Shows how far out of the loop I am.
XZodia wrote: There is no known method of attaching collision, but you could remove the landing gear completely by setting the bone scale to zero in the mode tag.
Oh bummer. There’s no way to offset the phmo from the hlmt to have the pelican rest a little higher off the ground?
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

Shadow07 wrote:
XZodia wrote: There is no known method of attaching collision, but you could remove the landing gear completely by setting the bone scale to zero in the mode tag.
Oh bummer. There’s no way to offset the phmo from the hlmt to have the pelican rest a little higher off the ground?
No, but maybe you could do the reverse, by raising the entire model slightly.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

XZodia wrote:
Shadow07 wrote:
XZodia wrote: There is no known method of attaching collision, but you could remove the landing gear completely by setting the bone scale to zero in the mode tag.
Oh bummer. There’s no way to offset the phmo from the hlmt to have the pelican rest a little higher off the ground?
No, but maybe you could do the reverse, by raising the entire model slightly.
Do you care to point me toward what values I could play with to accomplish that?
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

Pelican Mode tag -> Bones -> 1st chunk -> Y value
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

XZodia wrote:Pelican Mode tag -> Bones -> 1st chunk -> Y value
So I spent a few hours today playing with this. Changing the Y value just caused the pelican to spawn a bit higher and then it drops to the ground again. Apart from the landing gear all being sunk into the ground I've got the phmo tweaked to pretty much where I want it and the pelican is totally functional and usable. It occasionally tips on its side when you land it. I'm playing with the center of mass Y value to see if i can correct that. With a lowered angular flipping velocity you can right it pretty easily.

Here's how it sits currently:

Image
Image
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

Nice one.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

Ok so I've got damage seats working correctly and lock on targets for both the driver and the rear gunner. My next project may or may not be possible:

I want to link both rocket pods to one seat and for that seat to be the copilot seat(or at least located at the copilot seat position). Can it be done? What tags should I be looking at to change the location of a seat?
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

The seat will have a marker in the mode tag where you can set the position.
You can link the rocket pods to this the co-poilt seat in some fashion depending on how they are set up. I assume they are a vehi attachment? In which case just tick the box in the seat to say it powers the gunner.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Shadow07
Posts: 22
Joined: Tue Nov 13, 2012 1:03 am

Re: Pelican collision

Post by Shadow07 »

XZodia wrote:The seat will have a marker in the mode tag where you can set the position.
You can link the rocket pods to this the co-poilt seat in some fashion depending on how they are set up. I assume they are a vehi attachment? In which case just tick the box in the seat to say it powers the gunner.
I’ll play around with this and see what happens. I’ve worked out how to move the seats. The problem is that each rocket pod has its own seat and I can’t work out how to link both guns to one seat with one on the primary trigger and the other on the secondary.
Image
User avatar
XZodia
Staff
Posts: 2206
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Pelican collision

Post by XZodia »

Take a look at how the tank works for ideas
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Post Reply