Comments (19)
The Harvester function works but not in the way I was thinking. It only interacts with blocks to destroy them. The closest thing I can compare what I'm looking for is the way hit boxes work in the Immersive Vehicles mod for 1.12 They act like a solid block you can walk around on.
weird, I was trying to replicate the collision stuff in one of the BMP vehicles, looks like I got the wrong thing, or messed my testing up somehow..
I know this feature exists and works because I got it working on the abrams in my test environment. I'll send you the config of a vehicle I know has the feature - you can stand on it, walk into it e.t.c. and it seems to be modelled around the vehicle's hitboxes.
The collision mesh stuff is for player interactions, you can see the results in proto's dev videos, from many years ago. I'm pretty sure about that, but not 100% because I haven't looked at the code:
https://www.youtube.com/watch?v=hfgzoUoZlfY
https://www.youtube.com/watch?v=eVavrcIHSx8
https://www.youtube.com/watch?v=hpKfdbJFvws
Here's the config of a vehicle which has that feature, I'm just not sure which config actually enables it.
Scorpion.txt
from flans-mod-plus.
from flans-mod-plus.
Hi, I believe this feature exists already. There is both the ability for players to collide with a vehicles normal hitbox, and also a generic collision mesh system, though I haven't tested it - it was written by PrototypeTheta a long time ago. For the normal collision, iirc there's a config you have to enable, I can find it for your if you'd like? Or you can look in the config reference, Ctrl+F and look for collision.
I'm not 100% either feature does full interaction with players, and probably not mobs, but it's a starting point.
from flans-mod-plus.
I found what you mentioned in the config reference, Ill have to apply them to a vehicle and test them. Ill list my findings in this thread after I've gone through it.
from flans-mod-plus.
I dont know if the different collision boxes are supposed to render in debug mode or if I am putting them in to the txt for the vehicle wrong. I cant seem to get one into the game. any help is welcomed o the proper formatting.
from flans-mod-plus.
Can you post what you've tried, please?
from flans-mod-plus.
Sorry for delay
FancyCollison true
Attempt 1, AddCollisionMesh 0 0 0 16 0 0 0 0 0 0 0 0
Following the format stated X Y Z size p1mod p2mod p3mod etc, for each point
Attempt 2. AddCollisionMesh 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
X Y Z size then an X Y Z modification for each point
Attempt 3. Same as 1 but with AddCollisionMeshRaw
Attempt 4. Same as 2 but with AddCollisionMeshRaw
The CollisionShapeBox.java hasnt provided much help either with the exception that it shows it is there to be used.
(Update) : I have also tried what I did above with FancyCollision False. Have also tried to make the size of the box larger to see if it will run into anything.
Hope this helps anything. Not a big deal. I'm more focused on trying to figure out how the flight controller should be rewritten, but that is for a different issue later on.
from flans-mod-plus.
My memory is that there was a way to just have normal hitboxes have collision, and it's used in GFS iirc. It took me a long time to find, because.. why would a harvester be used for collision?
Harvester true HarvestToolType Tank HarvestBox [99,43,46] [-36,-10,-23]
There's a config, I would guess the two points are the start and end point of the hitbox.
Have a try with that and see if it does what you need, otherwise I can delve into the collision mesh stuff.
As for planes - I started a branch and had a poke around with rewriting the flight model from the ground up, but many other bugs/features have higher priority atm. If you can look at rewriting some of it, that would be extremely helpful - or just sharing drawings/ideas of how you think it should work.
from flans-mod-plus.
The Harvester function works but not in the way I was thinking. It only interacts with blocks to destroy them.
The closest thing I can compare what I'm looking for is the way hit boxes work in the Immersive Vehicles mod for 1.12
They act like a solid block you can walk around on.
Maybe the collision mesh part doe this, but I have a feeling it was intended as a way to replace the collision point system for when you crash into things.
For planes- I have some ideas as to how the physics should work as I fly planes IRL but, I wouldn't want them to be so realistic as to make it not easily playable. As for the coding of it, I'm more of a beginner so me writing any of it is probably not a good idea at this point. Ill open an issue once i have a system planned out.
Anyways, thanks for the help
from flans-mod-plus.
Apologies for delay
I have a suspicion the the collision meshes are directly coded into the models. (I dont know for sure, but i dont have any of the source java models from the pack you gave me the config from.)
the harvestbox feature only interacts with blocks to break them
Even after disabling the harvest box, the collision with the player was still there
no config options turned the feature off.
from flans-mod-plus.
Oke, I need to investigate these in the source, hopefully I can do that today.
from flans-mod-plus.
Hello again, I've done some more investigation - there's two systems.
-
The simple system: It uses standard hitboxes, that you can stand on. The crazy bit - it will only check for player collisions if the player is inside the HarvestBox set in config. Imo this is some crazy mixing of features which.. really shouldn't be done. But that's what it is. So if you just add
HarvestBox [99,43,46] [-36,-10,-23]
, it'll apply collisions to the players in that bounding box. (HarvestBox [sizeX,sizeY,sizeZ] [posX,posY,posZ]). I think the reason for adding this, was for the "Harvest box" to surround the entire tank, so it could be used to determine where to check for player collisions, but also what to be used as a harvester, for ramming trees, removing grass/leaves e.t.c. (Edit: I must stress that FancyCollision should be FALSE for this to work) -
The second system: Collision mesh. I need to investigate this further. (Edit: FancyCollision=true).
I'll also be putting my findings into the wiki.
from flans-mod-plus.
Okay! Success!
I managed to get the second system working, and here's an extract from the wiki page I've written about it.
2. Fancy method
This requires FancyCollision true
, its default value.
This system is a bit more tricky to use, but is a lot more powerful.
To specify what players should collide with, you create glorified shapeboxes. You still need the harvestbox code from the previous system to specify where to look for collisions.
To add a hitbox, you can use one of the following:
AddCollisionMesh [posX,posY,posZ] [sizeX,sizeY,sizeZ] [p1X,p1Y,p1Z] .. [p8X,p8Y,p8Z]
e.g.
AddCollisionMesh [0, 0, 0] [20, 50, 5] [0, -1, 0] [0, 0, 0] [0, 0, 0] [0, 0, 0] [0, -1, 0] [0, 0, 0] [0, 0, 0] [0, 0, 0]
AddCollisionMeshRaw posX posY posZ sizeX sizeY sizeZ p1X p1Y p1Z .. p8X p8Y p8Z
is the same, just with all the values in a long line.
For the turret, use AddTurretCollisionMesh
and AddTurretCollisionMeshRaw
.
The units here are also pixels, (16px = 1 block).
The player will collide with all six sides of this shapebox (IF they are in the harvester hitbox). In FM+USE, you can see the corners of these shapeboxes in debug mod, as particles.
============================
https://github.com/Unknown025/Flans-Mod-Plus/wiki/Player-Collisions
If you've got any other questions or want a sample config, let me know. Hope that helps ;)
from flans-mod-plus.
Much Appreciated. However , I can only seem to get the simple version working. When I copied and pasted the fancy method , no particles appear in debug mode. Currently running ver1.47.
Side note: the collision system seems to have no effect when applied to a plane config. Only ground vehicles or boats seem to work.
Would you mind posting a sample config and and a screenshot to show what debug looks like with the particles?
Attached is a config of a vehicle Im testing it on
LPM04_AriellaStriker.txt
from flans-mod-plus.
Ah, apologies. I had to uncomment the particle rendering, so it'll be out in the next update. I can try and get you a build this evening, with that in.
Yup, the system only seems to work for vehicles atm.
from flans-mod-plus.
Many Thanks. works well. However is it possible for the future to have this implemented for planes as well? I can see a few areas where it could be very helpful.
from flans-mod-plus.
Great! Glad to hear you've got it working. As for planes - it's probably a matter of copying the code across into the common base type. I can foresee issues with speed/collision detection and weird angles, especially that I don't know what will happen when things turn upside down. Therefore, I'll add it to the to-do list but the priority will have to be low because there isn't huge demand rn, and it may end up being.. quite buggy. But it's worth a shot.
from flans-mod-plus.
Is it alright if I close this in the meanwhile, given it's settled for the moment? I doubt I'm going to get to adding the collisions anytime soon sadly, but it is on the list.
from flans-mod-plus.
from flans-mod-plus.
Related Issues (20)
- Canceling Reload On Switching Slots HOT 11
- Ability to disable teams module - Very slow world loading. HOT 11
- When joining a world, (handheld) guns will initially not display animations HOT 2
- Flan's Mod Teams Conquest Mode HOT 4
- Sound upon vehicle hit HOT 3
- crash 1.56 Ultimate Stability Edition HOT 12
- CNPCs stuff HOT 3
- crash when pressing the create button in the vehicle crafting table HOT 10
- Small change in EntityBullet to prevent possible cast exceptions HOT 2
- Need help with flashbang sound HOT 6
- [Suggestion] Allow vehicle parameters to be modified HOT 5
- sometimes in multiplayer position of hands of the player holding weapon reset + question HOT 4
- [Questions] Attempting to make custom weapons + fixing vehicle crafting table crash HOT 12
- Version 1.8? HOT 3
- game crashes? when crafting a gun in a table HOT 4
- SetPlayerInvisible does not work on passengers HOT 2
- When aim anywhere, projectiles travel normally, but when aim at mobs, projectiles instant hit mobs HOT 8
- small crash with DropItemOnShoot gun config HOT 6
- Game crashes when using the lwjgl3ify mod HOT 2
- Missing recipes in v1.57 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flans-mod-plus.