Quantcast

Jump to content

» «
Photo

Collision doesn't scale?!

14 replies to this topic
meimeiriver
  • meimeiriver

    Crackhead

  • Members
  • Joined: 04 Mar 2017
  • Netherlands

#1

Posted 3 weeks ago

Wasted yet another day. Scaled down a prop_helipad_01 to 0.6 (in a ymap). Turns out its collision doesn't scale along with it, so I can't walk/land on it properly, after all. :( What a stupid game really (imagine scaling down an object in Second Life, and the collision wouldn't scale along with). And, naturally, there's no way to set it to 'phantom', either.

 

And another object, sr_Prop_Special_BBlock_Sml3, that CodeWalker showed scalable, doesn't scale in world at all.

 

There are days I think I should just quit.


LeeC2202
  • LeeC2202

    Mark Chump

  • Members
  • Joined: 24 Oct 2015
  • United-Kingdom

#2

Posted 3 weeks ago

That's probably why cars and peds can't be scaled in-game either. If you want a small car, then you have to make it small and make the collision match it.

 

The problem with CodeWalker might be that it is happy to let you scale things in a way that doesn't match how the game works. Which is probably why Map Editor and Menyoo don't let you do that.

  • meimeiriver likes this

meimeiriver
  • meimeiriver

    Crackhead

  • Members
  • Joined: 04 Mar 2017
  • Netherlands

#3

Posted 3 weeks ago Edited by meimeiriver, 3 weeks ago.

That's probably why cars and peds can't be scaled in-game either. If you want a small car, then you have to make it small and make the collision match it.

 

The problem with CodeWalker might be that it is happy to let you scale things in a way that doesn't match how the game works. Which is probably why Map Editor and Menyoo don't let you do that.

 

 

Is there at least a way to set the object to use no collision at all?!


LeeC2202
  • LeeC2202

    Mark Chump

  • Members
  • Joined: 24 Oct 2015
  • United-Kingdom

#4

Posted 3 weeks ago Edited by LeeC2202, 3 weeks ago.

If you spawn a prop, you can set it to have no collision but of course, with good old GTAV, that can make things fall through the floor, so you have to freeze the position as well.

 

Not sure what setting it to have no gravity would do, that might stop the falling through the floor problem.

  • meimeiriver likes this

meimeiriver
  • meimeiriver

    Crackhead

  • Members
  • Joined: 04 Mar 2017
  • Netherlands

#5

Posted 3 weeks ago

If you spawn a prop, you can set it to have no collision but of course, with good old GTAV, that can make things fall through the floor, so you have to freeze the position as well.

 

Not sure what setting it to have no gravity would do, that might stop the falling through the floor problem.

 

Can't find any such option in ymap. I also opened the exported odr file for the helipad, but I'm not seeing any references to collision at all.


LeeC2202
  • LeeC2202

    Mark Chump

  • Members
  • Joined: 24 Oct 2015
  • United-Kingdom

#6

Posted 3 weeks ago

 

If you spawn a prop, you can set it to have no collision but of course, with good old GTAV, that can make things fall through the floor, so you have to freeze the position as well.

 

Not sure what setting it to have no gravity would do, that might stop the falling through the floor problem.

 

Can't find any such option in ymap. I also opened the exported odr file for the helipad, but I'm not seeing any references to collision at all.

 

 

Ah, sorry, I am 100% clueless when it comes to ymaps, I only know World.CreateProp() to put objects in the world.

 

The collision might also be part of the world collision, so it could be another case of editing the map files. What does CodeWalker show when you view the collision mesh for that area of the map?

  • meimeiriver likes this

meimeiriver
  • meimeiriver

    Crackhead

  • Members
  • Joined: 04 Mar 2017
  • Netherlands

#7

Posted 3 weeks ago Edited by meimeiriver, 3 weeks ago.

 

 

If you spawn a prop, you can set it to have no collision but of course, with good old GTAV, that can make things fall through the floor, so you have to freeze the position as well.

 

Not sure what setting it to have no gravity would do, that might stop the falling through the floor problem.

 

Can't find any such option in ymap. I also opened the exported odr file for the helipad, but I'm not seeing any references to collision at all.

 

 

Ah, sorry, I am 100% clueless when it comes to ymaps, I only know World.CreateProp() to put objects in the world.

 

The collision might also be part of the world collision, so it could be another case of editing the map files. What does CodeWalker show when you view the collision mesh for that area of the map?

 

 

The problem with World.CreateProp() is that I can't spawn it scaled. And, while I can have it spawn scaled in ymap, I can't set its collision state there. :) Maybe I even could, as there are prop flags in ymap (always set to 32); but, in good old GTA V fashion, nobody knows what they mean.

 

So, my idea was to just set the pad to 'phantom', and then place a 100% Alpha prop over it, so I can still walk on it.

  • LeeC2202 likes this

meimeiriver
  • meimeiriver

    Crackhead

  • Members
  • Joined: 04 Mar 2017
  • Netherlands

#8

Posted 3 weeks ago

 

 

If you spawn a prop, you can set it to have no collision but of course, with good old GTAV, that can make things fall through the floor, so you have to freeze the position as well.

 

Not sure what setting it to have no gravity would do, that might stop the falling through the floor problem.

 

Can't find any such option in ymap. I also opened the exported odr file for the helipad, but I'm not seeing any references to collision at all.

 

 

Ah, sorry, I am 100% clueless when it comes to ymaps, I only know World.CreateProp() to put objects in the world.

 

The collision might also be part of the world collision, so it could be another case of editing the map files. What does CodeWalker show when you view the collision mesh for that area of the map?

 

 

There are no world collisions in that area, btw.


LeeC2202
  • LeeC2202

    Mark Chump

  • Members
  • Joined: 24 Oct 2015
  • United-Kingdom

#9

Posted 3 weeks ago Edited by LeeC2202, 3 weeks ago.

The problem might be that the prop you are trying to spawn, might rely on world collision being in place, which is why it might not have any collision of its own. I assume that prop already exists in the map, so what does the collision look like in the location where it already exists? What are the ymap entries like for that prop in that area?

 

I don't know what this prop looks like or where it is originally, so I can't offer much more than that I am afraid.

 

Edit: Of course, had I used a bit of thought, I would have read the first post properly and noticed you gave the prop name in it. :(


LeeC2202
  • LeeC2202

    Mark Chump

  • Members
  • Joined: 24 Oct 2015
  • United-Kingdom

#10

Posted 3 weeks ago Edited by LeeC2202, 3 weeks ago.

Ok, so this appears to be the ymap entry for this prop in one location on the map.

    <Item type="CEntityDef">
      <archetypeName>Prop_Helipad_01</archetypeName>
      <flags value="1572876"/>
      <guid value="1776169565"/>
      <position x="-286.45910000" y="-618.12500000" z="47.45354000"/>
      <rotation x="0.00000000" y="0.00000000" z="0.70710690" w="0.70710680"/>
      <scaleXY value="1.00000000"/>
      <scaleZ value="1.00000000"/>
      <parentIndex value="5"/>
      <lodDist value="123.00000000"/>
      <childLodDist value="0.00000000"/>
      <lodLevel>LODTYPES_DEPTH_HD</lodLevel>
      <numChildren value="0"/>
      <priorityLevel>PRI_REQUIRED</priorityLevel>
      <extensions/>
      <ambientOcclusionMultiplier value="255"/>
      <artificialAmbientOcclusion value="255"/>
      <tintValue value="0"/>
    </Item>

And that's for this location shown below. Looking at the model in 3DS Max, the collision is actually in the model, because there are lots of boxes that show as EGIMS_V_Col_PrimBox.

 

C8pLt3H.jpg

 

It's now 4:47am, so I am heading for bed... maybe this has given you a bit more to work with.


meimeiriver
  • meimeiriver

    Crackhead

  • Members
  • Joined: 04 Mar 2017
  • Netherlands

#11

Posted 3 weeks ago

Ok, so this appears to be the ymap entry for this prop in one location on the map.

    <Item type="CEntityDef">
      <archetypeName>Prop_Helipad_01</archetypeName>
      <flags value="1572876"/>
      <guid value="1776169565"/>
      <position x="-286.45910000" y="-618.12500000" z="47.45354000"/>
      <rotation x="0.00000000" y="0.00000000" z="0.70710690" w="0.70710680"/>
      <scaleXY value="1.00000000"/>
      <scaleZ value="1.00000000"/>
      <parentIndex value="5"/>
      <lodDist value="123.00000000"/>
      <childLodDist value="0.00000000"/>
      <lodLevel>LODTYPES_DEPTH_HD</lodLevel>
      <numChildren value="0"/>
      <priorityLevel>PRI_REQUIRED</priorityLevel>
      <extensions/>
      <ambientOcclusionMultiplier value="255"/>
      <artificialAmbientOcclusion value="255"/>
      <tintValue value="0"/>
    </Item>

And that's for this location shown below. Looking at the model in 3DS Max, the collision is actually in the model, because there are lots of boxes that show as EGIMS_V_Col_PrimBox.

 

C8pLt3H.jpg

 

It's now 4:47am, so I am heading for bed... maybe this has given you a bit more to work with.

 

 

Your brilliance is showing again! :) I don't own 3DS Max yet, but I'm sure I can find a free editor somewhere. This looks great!

 

Btw, I was looking for smaller helipads;  they exist, like dt1_11_heliport, for instance. It wouldn't spawn, though (not even in ymap). Guess this is one of those areas where the game is prohibitive again.

 

Anyway, been up all night myself again, so I should probably try and get some shut eye myself. Rest me to say I, once again, greatly appreciate your help. And you gotta appreciate the irony of someone allegedly having left GTA V literally being the only on ever replying.  :whistle: 


meimeiriver
  • meimeiriver

    Crackhead

  • Members
  • Joined: 04 Mar 2017
  • Netherlands

#12

Posted 3 weeks ago Edited by meimeiriver, 3 weeks ago.

The problem might be that the prop you are trying to spawn, might rely on world collision being in place, which is why it might not have any collision of its own. I assume that prop already exists in the map, so what does the collision look like in the location where it already exists? What are the ymap entries like for that prop in that area?

 

I don't know what this prop looks like or where it is originally, so I can't offer much more than that I am afraid.

 

Edit: Of course, had I used a bit of thought, I would have read the first post properly and noticed you gave the prop name in it. :(

 

 

That helipad is all over the place, and I have spawned a few myself elsewhere, so it definitely has its own collision. If only it didn't! :p

 

In the meantime, I went a bit creative with the other one:

 

https://1drv.ms/i/s!...SZ0BSFOpxSZe5Fv

 

It's about as big, but much less tall. I slapped a plateau underneath it, and called it the night. :)


LeeC2202
  • LeeC2202

    Mark Chump

  • Members
  • Joined: 24 Oct 2015
  • United-Kingdom

#13

Posted 3 weeks ago

That post I made was actually quite confusing, I mentioned 3DS Max and then posted an image from CodeWalker. There are no free editors that work with GTA V models btw, it's either 3DS Max or ZModeler3.

 

It will be interesting to know what the results of scaling that original helipad are, with those flag settings in the ymap. The result might be the same but it would be worth trying.

 

 

Anyway, been up all night myself again, so I should probably try and get some shut eye myself. Rest me to say I, once again, greatly appreciate your help. And you gotta appreciate the irony of someone allegedly having left GTA V literally being the only on ever replying.  :whistle:

 

You know me, I can't resist a challenge or the chance to help people. Old habits as they say... :)

  • meimeiriver likes this

CamxxCore
  • CamxxCore

    Mark Chump

  • Members
  • Joined: 19 Oct 2013
  • Canada

#14

Posted 3 weeks ago

It actually would be possible to scale it at runtime (via script) if you manipulate the matrices on the underlying entity instance. Relevant thread on gta5-mods 
 
Setting the second matrix in the physics instance, as suggested *should* solve the collision problem. Never actually tried though.

  • meimeiriver likes this

meimeiriver
  • meimeiriver

    Crackhead

  • Members
  • Joined: 04 Mar 2017
  • Netherlands

#15

Posted 2 weeks ago

It actually would be possible to scale it at runtime (via script) if you manipulate the matrices on the underlying entity instance. Relevant thread on gta5-mods 
 
Setting the second matrix in the physics instance, as suggested *should* solve the collision problem. Never actually tried though.

 

 

Thanks! :) That stuff is a little above my paygrade, tbh, but I think I might be able to pull it off.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users