Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Add ability to enable front loading like rear loading #174

Open
alfi0212 opened this issue Apr 29, 2023 · 3 comments
Open

Comments

@alfi0212
Copy link

Hi, thank you for this amazing mod!
I play with a hd baler with a bale chute and i would be creat if there would be a option to enableFrontLoading="true" - same like the option enableRearLoading="true" on the back of a trailer.
Best Regards

@alfi0212
Copy link
Author

alfi0212 commented Apr 29, 2023

I tried this: (added to UniversalAutoload.lua Line 1754)

		`local frontPickupTrigger = {}
		frontPickupTrigger.node = I3DUtil.getChildByName(triggersRootNode, "frontPickupTrigger")
		if frontPickupTrigger.node ~= nil then
			frontPickupTrigger.name = "frontPickupTrigger"
			link(spec.loadVolume.rootNode, frontPickupTrigger.node)
			
			local squareSide = spec.loadVolume.length+spec.loadVolume.width
			local width, height, length = squareSide, 2*spec.loadVolume.height, 0.01*squareSide

			setRotation(frontPickupTrigger.node, 0, 0, 0)
			setTranslation(frontPickupTrigger.node, 0, 0, 0.8*(length+spec.loadVolume.length)/2)
			setScale(frontPickupTrigger.node, width, height, length)

			table.insert(spec.triggers, frontPickupTrigger)
			addTrigger(frontPickupTrigger.node, "ualLoadingTrigger_Callback", self)
		end`

This works for me at the moment - maybe you have a another or better idea ... ?

@loki79uk
Copy link
Owner

loki79uk commented May 12, 2023

Sorry I read this on my phone and couldn't figure out what you had done, then completely forgot about replying! I've just looked again on my PC, and I'm still not quite sure what you have changed.

There is already an option to do this, but you should only have front or rear loading active for any one vehicle. Just use frontUnloadingOnly="true" in the options (in your local mod setttings file) for whatever vehicle you need it on.

@Bovrinox
Copy link

Bovrinox commented Apr 6, 2024

That looks like it refers to unloading, is there any way to add a front loading option to a trailer?
I am trying to use the Fahr Apn baler mod, and have the bales load onto a trailer, but I cant get it to stack the bales when they come from the front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants