|Category||Farming Simulator 15|
|Aden Kuenzi (akuenzi)||12.04.2016 17:21|
|I'm in the process of creating a script for plows/cultivators that spawns rocks while tillage is taking place (See WIP thread at http://fs-uk.com/forum/index.php?topic=181168.0). One of the challenges I am running into is that the rock upon being spawned can interfere with the plow/cultivator, sometimes bouncing it into the air. I could spawn the rocks away from the tillage equipment (and may ultimately need to do that), but if it's possible, I'd like to spawn them as close as possible to the tillage equipment for realism. Here's a picture of how I'd like to be able to spawn rocks:
Note, the cultivator is basically ignoring the rocks and passes straight through them. However, I do want the rocks to be 'noticed' every where else, as the player will need to pick them up with something (such as with a bucket loader, forks, etc.) and to haul them in trailers. I was able to figure out collision mask settings that would allow the first two, but not the latter. This is what happens when I put the rock on a trailer right now:
That little speck of gray (circled in red) is the edge of the rock that 'fell through' the trailer. Obviously, if one has a bunch of rocks to pick up, this is not a workable solution. And I know exactly which collision settings I need to get it to stay on the trailer (check boxes 1 or 13). That's not the problem. It's just that if I use that collision setting, then I have trouble with the rock interfering with the plow/cultivator and making it bounce into the air while it tries to work. I'm just wondering if there are other collision mask settings that will work, and give me the best of both worlds.
I did find this post on this forum: https://gdn.giants-software.com/thread.php?categoryId=16&threadId=677 It has some basic collision mask settings, but doesn't explain all the settings that might be available. I think I've seen equipment or other items that use some of the settings that aren't described. So that tells me other possible settings 'exist.' And in spite of trying lots of different combinations, I'm still no closer.
QUESTION: What collision mask settings do I need to use on the rocks that allow them to: (1) not interfere with the plow/cultivator as they till, (2) be able to be picked up with a loader/forks, and (3) be able to be loaded onto a trailer. Is this even possible?
Thank you in advance to all who choose to reply.
|William Rowe (Bonger76)||13.04.2016 02:36|
|that is a great idea,i dont do much scriting or equipment modding but could you move the rocks spawn point back into the particleAnimation at the back of the plow/cultivator ,or remove the collision off the plow disc and cultivator tines.IF you can get it to work you could mod a pull type potato harvester to pick them up.Your going to have to make a tip point for the rocks to .Thier is a real peace of equipment that you pull with a 250+ HP tractor that has a rototiller on the front pulls the rocks up out of the ground onto a convyer and into a dump box the work really good.Hope you can get it to work .
|Emil Drefers (giants.edrefers)||13.04.2016 06:57|
another approach might be applicable here.
You can spawn the rocks with a 'full' collision mask, but remove the collision between the rock and the components of the cultivator/tool which has spawned the rock.
As soon as the rock is outside of the cultivator you can re enbale the collision between them.
line 732 in Vehicle.lua:
|Aden Kuenzi (akuenzi)||19.04.2016 22:17|
Thank you for the suggestion, though I'm afraid that's a bit over my head at the moment (as is a lot of scripting)... in spite of reading that section of the vehicle.lua until I was cross-eyed. :) I think I at least understand in concept what it's doing there (ie, removing collisions on parts that fold together), which is a start I suppose. But we'll see. I'll keep working at it, as this would be really nice, and enhance realism.
@ William Rowe - Thank you! I've moved the spawn point all over the implement, and about where it works the best is where you've said -- back behind the plow/cultivator where it doesn't touch anything and simply appears on the surface of the ground. If I can't figure out how setPairCollision() works, that's probably where they'll have to spawn.
The modding of a potato harvester sounds like an interesting idea. It reminds me of the machine I remember back on the farm that we used to pick up rocks. Maybe some day if I learn how to model I could recreate the one I remember on the farm. However, many of the rocks that are being spawned by this, are necessarily 'large,' primarily so they can be seen and actually picked up. I'd like to spawn smaller rocks, but then I'm afraid the map will be littered with tiny objects that would be hard to see/pick up... so the compromise is slightly larger rocks... and these might not easily be picked up by a modded potato harvester.
There is indeed a 'tip point' for the rocks. The game engine will see the rocks the same as 'bales,' so if a map has a bale destroyer trigger, that will be a place where rocks can be disposed of.
Note: Log in to post. Create a new account here.