Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

[backburner]Appearing/disappearing door hitboxes

Ooferine opened this issue ยท 1 comments

commented

Chances are the current door system is already set in stone, but there should be still space for this. Speaking of bad tem....
Thing is, minecraft hitboxes are very limited. What if you want a hatchback that you can stand on the door when opened? No way you are achieving this unless you cut the hitboxes into little square boxes. What if you can't find a way to store the hitboxes in the open position? What if you dont want players to click on any door box to open it?

A mock json will explain better:

 //outside Left door handle closed
{
      "name" : "DoorL",
      "Pos" : [1.3125, 0.96875, 1.125],
      "width" : 0.3,
      "height" : 0.1,
      "state": 0,
},
 //outside Left door handle open
{
      "name" : "DoorL",
      "Pos" : [2.65199, 0.96875, 2.22175],
      "width" : 0.3,
      "height" : 0.1,
      "state": 1,
    },

Just a simple hitbox with a door variable and in which state of the variable should it appear. In other words, a visibility variable for hitboxes. We can even go the extra mile and make it support regular variables, but this might be far fetched.

I also marked it backburner for you, so less work for you i guess

commented

Doing this will be very hard to do given the current hitbox system. The idea with the current system is that if you have a door, or anything that moves, when you click it, it will move, but because it still exists, it should still have a hitbox that's click-able and able to move it back to its old position. Making hitboxes have variables and linked to visibility things would break a good number of the code routines where I do hitbox creation, while not providing much benefit to the end-users. Because, even if you don't want a hitbox to exist on a vehicle, doesn't mean you can't store it somewhere. Like, you could just move it inside another hitbox if you really didn't want it.

I'll possibly consider this if enough people ask for it at a later date. But for the moment, I'm going to flag it as a wontdo.